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 pes
Similar to what @firsthand said, I've read on the wxPython-user forums that you "replace" the current running application, that would be "command.com" or "CMD.exe", with pyw.exe or pythonw.exe when you use something like the following:
os.execl(sys.executable, *([sys.executable]+sys.argv))
see another post
Although I do not know how you would pipe io in this case.
I believe one benefit of this approach is if you run your script multiple times your OS taskbar with not fill up with CMD icons. The other way if you have several CMD minimized in the taskbar and start closing them, it is impossible to tell which CMD goes with which pythonw script.