If I save my code files as .pyw
, no console window appears - which is what I want - but if the code includes a call to os.system
, I still get a pesky console window. I assume it's caused by the call to os.system
. Is there a way to execute other files from within my .pyw
script without raising the console window at all?
You could try using the subprocess module (subprocess.Popen
, subprocess.call
or whatever) with the argument shell=True
if you want to avoid starting a console window.