[Idle-dev] right click to edit in windowsXP

Sean Wolfe sean at ticketweb.com
Tue Dec 2 19:04:24 CET 2008


Hey Tal, thanks for the reply. I'd love to hear about the patch if you
are so inclined :o)

-----Original Message-----
From: Tal Einat [mailto:taleinat at gmail.com] 
Sent: Tuesday, December 02, 2008 7:03 AM
To: idle-dev
Cc: Sean Wolfe
Subject: Re: [Idle-dev] right click to edit in windowsXP

Sean Wolfe wrote:
> hey everybody! first of all thanks for a fun, lightweight, friendly 
> ide. I'm just poking around using Python as a way to learn basic 
> coding, and idle is a fun place to do work.
>
> I'm seeing a problem when I right-click and then hit F5 to run the 
> program, where the first time I run the program it works fine, but 
> subsequent runs fail. I'm using the pygame module and windowsXP. For 
> example, a font I'm trying to render with pygame, first time renders 
> fine, subsequent runs error that the font has no width. Opening the
file via the executeable works fine.
>
> Doing some research, I noticed this on the pygame.org page:
>
> "On Windows if you open a python file with a "right-click: Edit with
Idle"
> the editor and interactive prompt both run from the same Python
process."
>
> http://www.pygame.org/wiki/FrequentlyAskedQuestions
>
> Is there a way to use the right-click option and save the F5 runs 
> spawn a new python process?>
> anyhow. . . thanks!
>
Hi Sean,

Sorry for the long delay before answering...


Yes, there is a way. You need to edit your registry and remove the -n
flag which is used when running IDLE via the "Edit with IDLE"
context-menu option.

If you do this, however, you will only be able to open one instance of
IDLE at a time in this way; trying to open another one in the same
manner will cause a 10 second delay after which you will receive an
annoying error message.

There is a way to get this working smoothly with as many instances of
IDLE as you like, but that requires patching your version of IDLE. I'd
be glad to explain how if you're that motivated :)

- Tal


More information about the IDLE-dev mailing list