.py and running in Windows:

Michael Yanowitz m.yanowitz at kearfott.com
Tue Jun 13 16:04:34 CEST 2006


Thanks.

   XP looks to be the same as 2000.
Works as expected now. Thank You.

Not sure what this 'thread' issue is.
I never specified a thread. I think perhaps though because I did
open another message in this mailing list (to get the correct
email address to send to), but I deleted all its contents i put
it under that other thread, however there is no indication of a
thread in Outlook email. I am sorry if it came up in another
thread that was not my intention.

-----Original Message-----
From: python-list-bounces+m.yanowitz=kearfott.com at python.org
[mailto:python-list-bounces+m.yanowitz=kearfott.com at python.org]On Behalf
Of Iain King
Sent: Tuesday, June 13, 2006 9:48 AM
To: python-list at python.org
Subject: Re: .py and running in Windows:



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




More information about the Python-list mailing list