[Twisted-Python] A useful value for argv[0]

Christopher Armstrong radix at twistedmatrix.com
Sun Feb 16 05:00:50 EST 2003

On Sun, Feb 16, 2003 at 01:22:50AM -0800, Brian Warner wrote:
> > >   I think it would be neat if twistd re-executed itself(/python), and
> > > specified the name of the tap/tas/tax file it was currently processing as
> > > the value for argv[0].
> I like it, but the re-exec step is a bit unfortunate. I can imagine problems
> (or at least user confusion) when twistd is run under strace, or pdb.
> Is there any python way to change argv[0] in place? C apps can muck with it
> all they like.. is sys.argv[0] mutable in any useful way?

Nope. I think there was a patch for Python to allow it to be mutable,
but nobody wanted to allow a change to main(), or something.


 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+     http://twistedmatrix.com/users/radix.twistd/

More information about the Twisted-Python mailing list