[python-win32] os.execv

Jorgensen, Jens jens.jorgensen@tallan.com
Wed, 10 Oct 2001 13:46:03 -0500


You didn't expect it to kill the pythonwin process? That's what exec is
supposed to do: overlay the process with a new process and start
executing that one, replacing the running process. Maybe you'd really
like it to fork? Or maybe you just want the system() call instead so the
calling process isn't wiped out.

Richard Cooper wrote:

>Hi,
>
>Is the a known issue with the os.execxxx function on win32? Because, I can't
>get them to work.
>
>This is my test.
>
>1) Create a batch file called test.bat containing the single line:
>echo hello
>
>2) Running this from the command line works fine
>
>3) Open python win and type
>
>>>>import os
>>>>os.execv(r"d:\test.bat",["foo"])
>>>>
>
>This kills the pythonwin process
>
>Rich
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
>


-- 
Jens B. Jorgensen
jens.jorgensen@tallan.com