[Python-Dev] Adding the 'path' module (was Re: Some RFE for review) (original) (raw)
Thomas Heller theller at python.net
Mon Jul 4 20:58:29 CEST 2005
- Previous message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Next message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Neil Hodgson <nyamatongwe at gmail.com> writes:
Thomas Heller:
OTOH, Python is lacking a lot when you have to handle unicode strings on sys.path, in command line arguments, environment variables and maybe other places. A new patch #1231336 "Add unicode for sys.argv, os.environ, os.system" is now in SourceForge. New parallel features sys.argvu and os.environu are provided and os.system accepts unicode arguments similar to PEP 277. A screenshot showing why the existing features are inadequate and the new features an enhancement are at http://www.scintilla.org/pyunicode.png One problem is that when using "python -c cmd args", sys.argvu includes the "cmd" but sys.argv does not. They both contain the "-c".
Not only that, all the other flags like -O and -E are also in sys.argvu but not in sys.argv.
os.system was changed to make it easier to add some test cases but then that looked like too much trouble. There are far too many variants on exec*, spawn* and popen* to write a quick patch for these.
Those are nearly obsoleted by the subprocess module (although I do not know how that handles unicode.
Thomas
- Previous message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Next message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]