Terry Reedy wrote:
Guido van Rossum wrote:
I'm not sure either way. I've heard it claim that Windows filesystem
APIs use Unicode natively. Does Python 3.0 on Windows currently
support filenames expressed as bytes? Are they encoded first before
passing to the Unicode APIs? Using what encoding?
> [os.listdir(bytes) returns list of bytes, open(bytes) fails]
More:
The path functions seem also do not work:
>>> op.abspath(b'tem')
...
path = path.replace("/", "\\")
TypeError: expected an object with the buffer interface
The error message is a bit cryptic given that the problem is that the
arguments to replace should be bytes instead of strings for a bytes path.
.basename fails with
...
while i and p[i-1] not in '/\\':
TypeError: 'in <string>' requires string as left operand, not int
os.rename, os.stat, os.mkdir, os.rmdir work. I presume same is true for
others that normally work on windows.
tjr
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com