dos box appears when clicking .pyc

Peter Hansen peter at engcorp.com
Fri Feb 11 22:00:58 EST 2005


Larry Bates wrote:
> Change the association for .pyc files to pythonw.exe
> from python.exe.

This might help further (taken from a properly configured
machine):

c:\>assoc .pyc
.pyc=Python.CompiledFile

c:\>ftype Python.CompiledFile
Python.CompiledFile="C:\a\python24\python.exe" "%1" %*

c:\>assoc .pyw
.pyw=Python.NoConFile

c:\>ftype Python.NoConFile
Python.NoConFile="C:\a\python24\pythonw.exe" "%1" %*


Note "pythonw" for ".pyw" files, and just "python" for
".pyc" files.  If you want .pyc files NOT to open up
the DOS box, you need to change the association to
what the .pyw files use, which is not the default and
possibly will not always do what you want.

-Peter



More information about the Python-list mailing list