How to hide console with Popen on Windows?

alex23 wuwei23 at gmail.com
Mon May 21 00:38:34 EDT 2012


On May 18, 6:22 pm, xliiv <tymoteusz.jankow... at gmail.com> wrote:
> Like the topic, more details in followed links..
> http://stackoverflow.com/questions/10637450/how-to-hide-console-with-...

Try replacing all of your code with something simple, a 'pass' op will
do. Run the script again. Does the console still open? Then it's not
subprocess that you're struggling with.

If I put your code into a .py file and execute it under Windows via a
double-click, I get a console: the one in which the .py file is
executing. Unless you're able to make the file a .pyw file - which you
are apparently not as you're using OpenOffice - then executing the
code that uses Popen is what is displaying a console, not the call to
Popen itself.



More information about the Python-list mailing list