2009/4/27 Cameron Simpson <c...@zip.com.au>: > I think that, almost independent of this PEP, there should be an > os.fsencode() function that takes a byte string (as a POSIX OS call > will take) and performs the _same_ byte->string encoding that listdir() > and friends are doing under the hood. And a partner os.fsdecode() for > string->bytes. That will save a lot of wheel respoking and probably make > it easier for people to think about this.
some_path.encode(sys.getfilesystemencoding()) -- Regards, Benjamin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com