[Tutor] python exe files

Jeff Shannon jeff@ccvcorp.com
Mon Jun 30 15:19:01 2003


GREENDAY31087@aol.com wrote:

> In a message dated 6/27/03 11:19:03 AM Pacific Daylight Time, 
> jeff@ccvcorp.com writes:
>
>
>> >pythonw.exe - what is this???
>> >
>>
>> This is a console-less version of the interpeter -- it's a Windows-style
>> app rather than a DOS-style app (as python.exe is).  This means that if,
>> for instance, your Python script has a GUI and opens its own windows,
>> etc, then you can run it in pythonw.exe and it won't have an ugly and
>> otherwise useless DOS box open as well.
>>
>
> I have a few GUIs. How would I run them with pythonw.exe?
> -Wayne (win98)


There's a couple of ways.  The easiest is probably to change the name of 
your program to myprogram.pyw instead of myprogram.py -- the .pyw 
extension should be linked to pythonw.exe, while the .py extension is 
linked to python.exe.  You can also simply type 'pythonw.exe 
myprogram.py' at a DOS prompt or in the 'Run...' dialog, though that 
kind of defeats the purpose of using pythonw instead of python.  You can 
also create a .BAT file or a shortcut that runs 'pythonw.exe myprogram.py'.

Jeff Shannon
Technician/Programmer
Credit International