[PATCH] sys.modify_argv()

Donn Cave donn at drizzle.com
Sat Aug 25 09:43:17 CEST 2001

Quoth Dave Cinege <dcinege at psychosis.com>:
[... why not sys.argv ]
| Why I didn't do this:
| 1) From what I've looked at, the current sys code would change
| dramatically as it's already dealing in copies of argv initialized
| at python startup, and not by accessing  Py_GetArgcArgv() dynamically.
| What I did is less intrusive and portable outside of sys.
| 3) It's not yet exactly clear (to me) to what extent you can alter argv
| and not impeed portability. This is probably reason enough to segregate this
| functionality. (On linux it stacks argv elements concurrently in memory and
| it's safe to use that total space anyway you want. Who knows
| how other OS's deal with it...)

Indeed, who does know.  You can find a fairly exhaustive treatment
in recent sendmail sources, but in the end that only demonstrates
what a can of worms this is.  Since it's of questionable value
anyway, you were right to write it in a way that you can easily
maintain for your own purposes.

	Donn Cave, donn at drizzle.com

More information about the Python-list mailing list