+2  A: 

Try this:

from subprocess import Popen, PIPE, STARTUPINFO, STARTF_USESHOWWINDOW
startupinfo = STARTUPINFO()
startupinfo.dwFlags |= STARTF_USESHOWWINDOW
p = Popen(cmdlist, startupinfo=startupinfo, ...)
Daniel Pryden
If you set `STARTF_SHOWWINDOW`, you will also want to initialise the `wShowWindow` member of `startupinfo`. This method relies on the program that you run actually acting upon the `wShowWindow` flag; it's not required to do so.
Greg Hewgill
NICE! thanks! this feels so much better now.
B Rivera
i upvoted both answers and flipped a coin for best answer, ewall won.
B Rivera
Ah well. I got my answer in first (by 8 minutes, no less!) and I still don't get the points. :-) No worries, ewall needs the upvotes more than I do.
Daniel Pryden
ah, sorry, i didn't pay attention to time. still new here.
B Rivera
+2  A: 

Thanks to another StackOverflow thread, I think this is what you need:

startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
p = subprocess.Popen(args = "demo.exe", stdout=subprocess.PIPE, startupinfo=startupinfo)

I tested on my Python 2.6 on XP and it does indeed hide the window.

ewall
NICE! thanks! this feels so much better now.
B Rivera
If you set `STARTF_SHOWWINDOW`, you will also want to initialise the `wShowWindow` member of `startupinfo` to one of the `SW_*` constants. This method relies on the program that you run actually acting upon the `wShowWindow` flag; it's not required to do so.
Greg Hewgill