[Tutor] interpreter restarts

Tiger12506 keridee at jayco.net
Mon Jul 16 13:11:50 CEST 2007

> But there's an exception to that - if you right-click a file in Windoze
> and 'edit' it,
> IDLE won't open up its subprocess, and as such, it can't restart the
> interpreter session because it's running in the same
> process as IDLE, and to restart the interpreter would mean restarting 
> Boy, that 'edit with idle' thing sure does cause some problems, don't it? 
> :)
> -Luke

Thanks, Luke. I hadn't thought of that. Question: Why won't IDLE open up its 

This is the command that is in the registry concerning the Edit with IDLE 
"C:\Python25\pythonw.exe" "C:\Python25\Lib\idlelib\idle.pyw" -n -e "%1"

This is the Target for the shortcut in the Start Menu (Note: the Target box 
was disabled!)
Python 2.5.1

I thought that this was incredibly strange, so I opened this shortcut in a 
hex editor to see what was different about this shortcut. (Normally, they 
have a path in the target box)

What I found surprised me. The title of the file in the hex editor said 
I started laughing maniacally and checked the full path of the file from 
within the hex editor.

IDLE is started in two *very* different ways. So my next question was: Can 
you pass arguments to this python_icon.exe? Simple navigations to that 
directory and a confirmation... Yuck. You can't even execute it from 
explorer. A low-level ZwTerminateProcess function from ntdll is called ... 
Let me try something...

Woah... {31800004-6386-4999-a519-518f2d78d8f0} appears in the registry in 
alot of places. The Uninstall key for Add/Remove Programs, some weird data 
thing... Okay, this is beyond me. I don't know the registry or understand 
CLSIDs very well. Someone who knows Windows inside and out has done a number 
with the python installer, or at least the msi installer does this all 
automatically. Interesting. I wonder just how python_icon.exe starts IDLE. 
If I could figure that out, I could emulate it with the Edit w/Idle menu 
item and get IDLE to start a subprocess! But how.... any ideas?


More information about the Tutor mailing list