os.walkでShift_JISで扱えない文字のファイルが存在する場合にstringでフォルダを 検索すると文字が???になる。 >>> for root,dirs,files in os.walk('c:\\temp\\unicode'): ... print root ... print files ... c:\temp\unicode ['?.txt'] os.walkに渡す文字列をUnicode文字列として渡せば正しく取得できる。 >>> for root,dirs,files in os.walk(u'c:\\temp\\unicode'): ... print root ... print files ... c:\temp\unicode [u'\u2661.txt']