Hmm... Maybe you could shorten your signature to two lines :-)
> Right, what I would like to do is change the python process's argv
> so that a ps shows the <script name> not python <scriptname>. Now
> sys.argv contains the script name, and it is possible to do this,
> perl does using $0, but I think it is OS dependent.
For executable python scripts with #! /usr/local/bin/python as their
first line, this happens automatically on my system (SGI IRIX 4).
If you run the Python interpreter with the script as first argument,
the script name appears in sys.argv but "python" appears in the ps
listing. The same is true for Perl though (except there "perl" appers
in the ps listing :-).
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>