More Python command-line features
While we're talking about Python command-line features, I have a couple of requests that would make life alot easier for us. 1. I'd like the options given before the script name to be accessable to Python scripts. For example, in: python -O foo.py bar spam I'd like to have a sys variable that told me that the arguments ['-O'] were included before the arguments ['foo.py', 'bar', 'spam'] (aka sys.argv). This is needed if I want to fork/exec (or span or whatever) Python with the same option. 2. I'd like to be able to supply environment variables to Python on the command line, as in: python -O -e PYTHONHOME=/Zope foo.py bar spam This would be very helpful in environment-variable-challenged environments like windows 9x, and might be handy elswhere as well. If people agree that these would be good ideas, I'd ve happy to supply a patch. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (4)
-
Fred L. Drake, Jr.
-
Greg Ward
-
Jim Fulton
-
M.-A. Lemburg