[Python-Dev] Python-3.0, unicode, and os.environ (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Sun Dec 7 02:12:24 CET 2008


Toshio Kuratomi wrote:

Note 2: If there isn't a parallel API on all platforms, for instance, Guido's proposal to not have os.environb on Windows, then you'll still have to have a platform specific check. (Likely you should try to access os.evironb in this instance and if it doesn't exist, use os.environ instead... and remember that you need to either change os.environ's data into str type or change os.environb's data into byte type.)

Note that this is why I personally think the binary API variants should exist on Windows, just with the sense of the system encoding flipped around.

That is, on *nix:

While on Windows:

Cheers, Nick.

-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia



More information about the Python-Dev mailing list