Re: Python equivalent of Perl's assignment to $0

Adrian Phillips - Tandem User (tandem@typhoon.oslo.dnmi.no)
08 Jul 1994 05:33:15 GMT

In article <9407071558.AA19681=guido@voorn.cwi.nl> Guido.van.Rossum@cwi.nl writes:

> In Perl assigning to $0 is a useful way of following the progress of a
> long running process. Can a similar thing be done in Python?

Currently, no. I suppose an interface could be added to sys to set
the real argv[0]. But is it worth it?

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>

Well, depends how much work it is and thus how much it bloats
Python. If not much, some people may have use of it. But as you
mentioned to me some time back, not all OSs will take what you put
there and place it in a ps listing. Put it on the list of maybes, if
someone really wants perhaps they can do it themselves.

Adrian

--
-------------------------------------------------------------------------
= Adrian Phillips at            | BUT any thoughts in this are purely    =
= The Norwegian Meteorological  | my own and have nothing to do with     =
= Institute   	    	        | this establishment, thankfully.        =
= Net: adrian.phillips@dnmi.no  | Phone: 47 22 96 32 09 Fax: 47 22 96 30 50