dos box appears when clicking .pyc

P

Philippe C. Martin

Hi,


For a few months now, I have been used .pyc script under XP without
getting the "DOS" box.

I just re-installed the scripts on another XP box and am now getting the
DOS box !

Something to do with the registry ?

Regards,

Philippe





--
***************************
Philippe C. Martin
SnakeCard LLC
www.snakecard.com
***************************
 
L

Larry Bates

Change the association for .pyc files to pythonw.exe
from python.exe.

Larry Bates
 
P

Peter Hansen

Larry said:
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
 
T

Tim Roberts

Philippe C. Martin said:
For a few months now, I have been used .pyc script under XP without
getting the "DOS" box.

You don't usually click on .pyc scripts. You click on .py and .pyw
scripts. .pyw files will not bring up a DOS box.

If you really want .pyc files to run without a DOS box, bring up a command
shell and type

assoc .pyc=Python.NoConFile

(Actually, you should type "assoc .pyw" to make sure that is its file
type.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top