[Idle-dev] right click to edit in windowsXP
taleinat at gmail.com
Tue Dec 2 16:03:00 CET 2008
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."
> Is there a way to use the right-click option and save the F5 runs spawn a
> new python process?
> anyhow. . . thanks!
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"
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 :)
More information about the IDLE-dev