I am a python newbie and need some help. I am writing a python script to call an application exe(say abc.exe). I am using subprocess.popen for this purpose. e.g. :
r_stdout = subprocess.Popen(CommandLine,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE).communicate()[1]
the CommandLine
here is : abc.exe -options "<optionstr>"
. abc.exe is a black box to me and it is producing an error prompt for some of the options I am passing. The error prompt is a standard windows' prompt saying abc.exe has stopped working, giving me 3 options to check online for solution, close program, debug program.
Now my question is : Is there any way to avoid this command prompt ? i.e. is there a way for a python script to suppress this prompt ?
This site seems to have the solution. Basically, it says to include this at the start of your script:
After this, you'd execute your subprocess like this:
The MSDN site has a page which defines many types of creation flags. Hope this helps.