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: - underlying OS API uses bytes - binary API just passes values straight through - Unicode API uses the system encoding to encode Unicode names and values to be passed to the OS API and to decode bytes names and values received from the OS API While on Windows: - underlying OS API uses Unicode - Unicode API just passes values straight through - binary API uses the system encoding to decode bytes names and values to be passed to the OS API and to encode Unicode names and values received from the OS API Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ 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