.py and running in Windows:

tactics40 at gmail.com tactics40 at gmail.com
Tue Jun 13 10:06:20 EDT 2006


The only problem I know of for changing PY files to open up in an
editor is that it could screw up Python as a CGI with Apache under
Windows. To change file associations, right click and go to "Open
With." Choose your text editor and click "always open with this
problem" at the bottom.

And easy way to run your scripts is to open a console (Start->Run->type
"cmd.exe" and hit OK). Type "python" and drag&drop your .py file into
the console. It will copy the path name ("C:\programming\python
stuff\myproject\mypython.py").


Michael Yanowitz wrote:
> Hello:
>
>   Presently in my Windows 2000 system, when I double-click on a
> .py file (open it) it automatically runs it in Python. I would
> like to change that behavour. That is fine for .pyc file, but
> for .py files, I would either like to have it run in Python but
> return to the Python shell prompt when finished rather than
> exit the shell. How do I do that?
>   Or would it cause a problem (so that Python no longer works) if
> I change the default .py extension to open in an editor rather
> than execute it if I open it?
> 
> Thanks:
> Michael Yanowitz




More information about the Python-list mailing list