Martin v. Löwis <[email protected]> added the comment:
On Windows, using the bytes APIs for filenames is unreliable and fails for
characters that are not in the ANSI code page. So you should use
import os
for i in os.listdir(u'.'):
print os.path.isfile(i), '\t', i
instead.
----------
nosy: +loewis
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com