How to run Python in Windows w/o popping a DOS box?
Tim Peters
tim.peters at gmail.com
Tue Apr 19 23:56:51 EDT 2005
[Paul Rubin]
> Dumb question from a Windows ignoramus:
>
> I find myself needing to write a Python app (call it myapp.py) that
> uses tkinter, which as it happens has to be used under (ugh) Windows.
> That's Windows XP if it makes any difference.
Nope, the Windows flavor doesn't matter.
> I put a shortcut to myapp.py on the desktop and it shows up as a
> little green snake icon, which is really cool and Pythonic. When I
> double click the icon, the app launches just fine and the tkinter
> interface does its thing. But Windows also launches a DOS box that
> just sits on the screen uselessly.
...
> Question: is there any simple way to arrange to launch the app from
> the desktop, without also launching a DOS box? ...
>From a DOS box,
ren myapp.py *.pyw
and click on a link to the resulting myapp.pyw instead. It's the
purpose of the .pyw extension on Windows not to "bring up a DOS box".
.pyw is associated with the Windows-specific pythonw.exe.
More information about the Python-list
mailing list