Re: Python subprocess question

2009-01-06 Thread Roger
On Jan 6, 1:18 pm, s...@pobox.com wrote: >     Roger> .setDaemon(True) means the thread gets destroyed when the program >     Roger> exits and default .setDaemon(False) means that the thread >     Roger> continues to process even when the main program is gone? > > Approximately.  The main thread (a

Re: Python subprocess question

2009-01-06 Thread skip
Roger> .setDaemon(True) means the thread gets destroyed when the program Roger> exits and default .setDaemon(False) means that the thread Roger> continues to process even when the main program is gone? Approximately. The main thread (and thus the program) will exit only when all non-

Re: Python subprocess question

2009-01-06 Thread Roger
On Jan 6, 7:46 am, Duncan Booth wrote: > "Alexi Zuo" wrote: > > Hi everyone, > > > Here I have a simple program which starts a thread and the thread use > > Popen to execute a shell cmd which needs a long time.  I want to stop > > the thread once I type "ctrl+C" (KeyboardInterrupt). But in fact t

Re: Python subprocess question

2009-01-06 Thread Duncan Booth
"Alexi Zuo" wrote: > Hi everyone, > > Here I have a simple program which starts a thread and the thread use > Popen to execute a shell cmd which needs a long time. I want to stop > the thread once I type "ctrl+C" (KeyboardInterrupt). But in fact this > program enters a dead loop. Can anyone tel

Python subprocess question

2009-01-06 Thread Alexi Zuo
Hi everyone, Here I have a simple program which starts a thread and the thread use Popen to execute a shell cmd which needs a long time. I want to stop the thread once I type "ctrl+C" (KeyboardInterrupt). But in fact this program enters a dead loop. Can anyone tell me what is wrong? Alex from s