argv[0] manipulation

James Kew james.kew at btinternet.com
Fri Dec 13 17:15:45 EST 2002


"Bernhard Herzog" <bh at intevation.de> wrote in message
news:6qpts5epgw.fsf at salmakis.intevation.de...
> sys.argv[0] [...] must be the filename of the script in such a way that
passing it
> open opens the correct file.

Don't rely on this being portable: the sys module documentation
(http://www.python.org/doc/current/lib/module-sys.html) makes no such
guarantees about sys.argv[0].

James





More information about the Python-list mailing list