Hiding the DOS console on a console application on Windows
Eric Brunel
eric.brunel at pragmadev.com
Fri Jan 25 10:42:04 EST 2002
Hi all,
We've got a problem for which we were unable to find a solution: we have an
Windows application that communicates with a console application and that
needs to occasionally send it a Ctrl-Break. The only way we found to do that
was to use the Windows function "GenerateConsoleCtrlEvent" via an extension
module. Problem: this function only works if the parent and child processes
share the same console, so our application has to be run or built as a
console application. That means a start-up script with a .py extension (no
.pyw, or it doesn't work), or a build without the option suppressing the
console (e.g., no '--noconsole' option with Gordon McMillan's installer).
However, our application has a GUI of its own, and we need to get rid of the
DOS console that opens automatically when our script is run. Does anybody
know a means to hide this console? We understand that this window has to be
created, but we just don't want to see it...
Our application uses Python 2.1.1 with a Tkinter GUI under Windows2k.
TIA
- eric -
More information about the Python-list
mailing list