os.system() on Windows in Tkinter app spawns console window
nobody at nowhere.com
Sat Aug 13 07:15:25 CEST 2011
On Fri, 12 Aug 2011 22:49:32 -0400, Kevin Walzer wrote:
> I'm developing a Tkinter app for a Windows customer, and the app bundles
> several command-line tools (ported from Unix). I call out to these
> console tools from the Tkinter app via os.system(). However, in the
> frozen version of my app, when I call out to these tools, I get multiple
> console windows popping up. This is jarring to say the least. Is there
> any way to run the commands under the hood without the console/DOS
> windows popping up?
Just a wild guess, but try explicitly redirecting the commands'
stdin/stdout/stderr. You might also consider using subprocess.call()
instead of os.system().
More information about the Python-list