Stop popup cmd window

Derrick 'dman' Hudson dman at dman13.dyndns.org
Wed Dec 17 21:28:23 CET 2003


On Tue, 16 Dec 2003 18:06:16 -0500, hokieghal99 wrote:
> Thomas Heller wrote:
> 
>> Name the script 'myscript.pyw' instead of 'myscript.py'.
>> 
>> Thomas
> 
> Thanks for the tip... that did it. I need to read up on the difference 
> between python.exe and pythonw.exe.

The difference is a Microsoft one.  The former has stdin, stdout and
is a normal program.  Microsoft dictates that on Windows such programs
must have a black window appear for the life of the program.  The
latter is an "MFC" (or whatever the proper term is) program with no
stdin or stdout.  On MS Windows this means that you don't get a black
box appearing, and it also means that the 'print' statement and
raw_input() function are useless.  The difference is the specific
functions the C runtime calls to notify Windows of which sort of app
it is during startup.  On non-Windows platforms (eg UNIX) there is no
such distinction.  All (UNIX) apps have stdin and stdout, though they
aren't necessarily connected to the user in any way, but could be if
run in such a context.

HTH,
-D

-- 
For society, it's probably a good thing that engineers value function
over appearance.  For example, you wouldn't want engineers to build
nuclear power plants that only _look_ like they would keep all the
radiation inside.
    (Scott Adams - The Dilbert principle)
 
www: http://dman13.dyndns.org/~dman/            jabber: dman at dman13.dyndns.org




More information about the Python-list mailing list