[Python-Dev] Pondering some changes to python.c...
M.-A. Lemburg
mal@lemburg.com
Mon, 08 Apr 2002 10:33:21 +0200
Sean Reifschneider wrote:
>
> I've been pondering some changes to the main() interpreter code for a
> while. I'd like to get some feedback on them.
>
> One is making changes to the process title to remove the interpreter name.
> I've implemented some code to do this, which I'll include below. I realize
> that this code won't work for every platform, but for some it would be
> quite a nice change. In particular, it would allow things like "killall"
> to be able to work on python programs.
>
> The basics are that I check to make sure all the argv elements are
> sequential, then just do "memcpy(argv[0], argv[1], appropriateSize)", and
> pad strlen(orig_argv[0]) at the end with '\0'. This is after saving a copy
> of the original argv to hand off to Python itself.
-1 on making it the default -- there are programs relying on this.
+1 on providing a sys module interface for this so that programs
can choose the name on their own.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/