.py and running in Windows:

imcs ee imcsee at gmail.com
Tue Jun 13 12:16:50 EDT 2006


i modify
"C:\Python\python.exe" -i "%1" %*
to
cmd /k;"C:\Python\python.exe" -i "%1" %*
or
cmd /k;"C:\Python\python.exe" "%1" %*

just a little trick.


On 13 Jun 2006 06:48:23 -0700, Iain King <iainking at gmail.com> wrote:
>
>
> Andrew Gwozdziewycz wrote:
> > You'll have better results posting this to it's own thread.
> >
>
> He certainly should have, but since I've read it here anyway:
>
>
> > On Jun 13, 2006, at 9:29 AM, 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?
> > >
>
> In an explorer window, go to Tools->Folder Options
> Go to the File Types tab, find the PY extension, then click on
> Advanced*
> Select the 'open' action, and click Edit...
> change the 'Application used to perform action', inserting a '-i'
> between the exe and the first parameter.  For example, I changed mine
> to:
>
> "C:\Python\python.exe" -i "%1" %*
>
> The exact line will depend on where your python.exe is.
> OK all the dialogs you've opened, then double click a .py file to test
> it.
>
> *I'm using WinXP, so the exact name of some of the buttons may be
> different for you.
>
> Iain
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060614/e64e8e1a/attachment.html>


More information about the Python-list mailing list