python subprocess know how
- From: King <animator333@xxxxxxxxx>
- Date: Sun, 31 Aug 2008 01:55:41 -0700 (PDT)
Hi,
I am using subprocess module to execute a command and print results
back.
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
my_process = subprocess.Popen(cmnd, startupinfo=startupinfo)
print repr(my_process.communicate()[0])
This code executes on pressing a button (wxPython). The problem is
until command is not done
and it's results are not printed, program halts and button keep the
state of pushed.
Is there any way to avoid this?
Thanks
.
- Prev by Date: configure kdevelop for python
- Next by Date: Re: Writing to ms excel
- Previous by thread: configure kdevelop for python
- Next by thread: Uses of docutils
- Index(es):