Re: Spawn/Kill Process



I need to write a script that starts an exe and then continues through
the script. I am able to start the exe file but my script doesn't
continue because the process I start runs in the background of Windows
(as it is supposed to). I have tried using both os.system and os.popen
to get around this but still no luck. It seems as if Python does not
move to the next line of code UNTIL the program spawned completes
(which this one never will as it is supposed to continuously run in
the background). Does anyone know of a way around this so I can spawn
the program and continue through my script?

You might want to try the spawn* family of functions and pass the
P_NOWAIT mode parameter. You can read all things spawn* here:

http://docs.python.org/lib/os-process.html
.



Relevant Pages

  • Re: Using spawn() to capture output of child process
    ... e.g. the sbmjob mimicking a spawn and the semicolon ... separated requests mimicking a script: ... and the spawned results to go to spool since that runs ... The spawned child process executes a simple shell script ...
    (comp.sys.ibm.as400.misc)
  • RE: ASP and WMI
    ... I'm wondering if ur using COM to call the script or if your trying to call ... currently logged on user) then once the user loggs of the server the COM+ app ... If ur not using COM but pure ASP then it might be an idea to spawn the ... ie VB can be used to spawn these process via a COM+ ...
    (microsoft.public.windows.server.scripting)
  • Re: send or spawn to interactive script
    ... myscript.pl is another interactive script for which I'm trying to ... spawn $FULL_PATH/myscript.pl -S ... I'm writing a expect script to talk to a interactive perl script on a ... ssh to remote host using spawn i.e spawn ssh -l user hostname ...
    (comp.lang.tcl)
  • Re: Expect question
    ... I develop a table game. ... My Expect script (when the error occurs but the background output ... spawn wish foreground_process.tcl ... interact -i $sil ...
    (comp.lang.tcl)
  • Re: Using spawn() to capture output of child process
    ... e.g. the sbmjob mimicking a spawn and the semicolon ... separated requests mimicking a script: ... and the spawned results to go to spool since that runs ... The spawned child process executes a simple shell script ...
    (comp.sys.ibm.as400.misc)