Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Windows 7 and with my Python installation. When I specify script.py in cmd.exe and hit Return/Enter, instead of executing the python file, I am given an error message (sth like "not a command").

How do I tell Windows to run the Python interpreter when specifying or double-clicking a Python script?

share|improve this question

Associate the .py extension with the python.exe interpreter executable. Normally the installer does this for you.

share|improve this answer
    
Thanks, and here's how to: docs.python.org/faq/windows.html – new Jun 22 '10 at 8:43
3  
I'd rather suggest to associate the .py extension with the pythonw.exe by default, to anticipate the question "It works now, but I don't want to see that cmd window." – vtest Jun 22 '10 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .