How to eliminate consol window in MS Windows

Mark Hammond mhammond at skippinet.com.au
Thu Oct 28 03:38:55 EDT 1999


>  : O change the file extension from .py to .pyw to do it
> automatically.
>
> does it work when you call the script from another python script
> via os.system? it does not for me, the console window is opened
anyway
> os.system('program.pyw '+arguments)

That is a peculiarity with os.system on the windows platform.  The
simplest way to achieve what you specifically need is to use
win32api.ShellExecute().  If you want really fine grained control you
must use win32process.CreateProcess.  Unfortunately both these
techniques need the win32 extensions.

Mark.





More information about the Python-list mailing list