pythonw.exe

Nobody nobody at nowhere.com
Sun Aug 14 10:30:25 EDT 2011


On Sun, 14 Aug 2011 06:23:45 -0700, Ronald Reynolds wrote:

> in my python directory there is a python.exe file which I understand
> completely but there is also a pythonw.exe DOS seems to honor the pythonw
> command (No error message) but nothing happens. What is pythonw.exe?

Windows distinguishes between "console" and "GUI" executables. python.exe
is a console executable, pythonw.exe is a GUI executable. One difference
is that GUI executables don't have stdin/stdout/stderr, so you can't use
pythonw.exe as an interactive interpreter.

The main use for pythonw.exe is if you write a GUI program in Python
(using e.g. TkInter, wxPython, etc) and you want it to be able to run it
from an icon (desktop, start menu) without it opening a console window
(running a console executable from an icon will open a console window).

> Also
> is there a way to invoke idle from the DOS prompt?  I tried idle
> filename.py  and  just idle. Is there any .exe for idle?

"C:\Program Files (x86)\Python27\Lib\idlelib\idle.py" filename.py

... or similar, depending upon where Python is installed.

BTW, unless you're using Windows 95/98/ME, you don't have a
"DOS Prompt". The command prompt in Windows NT/2000/XP/Vista/7 isn't DOS.




More information about the Python-list mailing list