Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

python subprocess know how

116 views
Skip to first unread message

King

unread,
Aug 31, 2008, 4:55:41 AM8/31/08
to
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

Cameron Laird

unread,
Aug 31, 2008, 12:24:06 PM8/31/08
to
0 new messages