[issue10754] os.path.isfile doesn't work with some greek characters
Martin v. Löwis
report at bugs.python.org
Wed Dec 22 07:19:03 CET 2010
Martin v. Löwis <martin at v.loewis.de> 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 <report at bugs.python.org>
<http://bugs.python.org/issue10754>
_______________________________________
More information about the Python-bugs-list
mailing list