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

Tommi Virtanen tv at twistedmatrix.com
Sun Feb 16 10:18:25 EST 2003

On Sun, Feb 16, 2003 at 01:22:50AM -0800, Brian Warner wrote:
> 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?

	C apps can't really muck with it all they like. There's a lot
	of limitations. In general, increasing the legth is not portably
	safe (without horrible kludges), and no minimum length can be

	The only simple, portable way is opportunistically resetting
	argv[0] if and only if the len(newValue) <= len(oldValue).

:(){ :|:&};:

More information about the Twisted-Python mailing list