Untangling pythonWin and IDLE Processes on XP Pro

Rhodri James rhodri at wildebst.demon.co.uk
Fri Feb 13 23:57:42 CET 2009

On Fri, 13 Feb 2009 11:13:38 -0000, W. eWatson <notvalid2 at sbcglobal.net>  

> OK, enough tinkering with the code and others matters on my end trying  
> to find a work around. Somehow after much successful use of IDLE's  
> execution facility, I've stepped on an invisible banana peel. I think  
> it's evident that I'm not going around this problem easily with the IDLE  
> execution attempts, and that another solution is required.

Congratulations, we've only been telling you this for the last few days.
I wonder, is there any chance that you've noticed the solution given?

> First, I think somewhere up the thread someone suggested that Active  
> pythonWin is not dependent upon Tk, correct?

Someone certainly suggested that something is based on Microsoft
Foundation Classes, which isn't very likely to be Tk-based :-)
Whatever that something is, I'm pretty sure it isn't called "Active

> Therefore, it is immune from such problems, correct?


Let me put it like this.  Your Tkinter program is listening out for
events like windows being moved, the mouse being clicked, keys being
pressed and so on.  IDLE also listens out for a selection of events
of the same sort.  A different graphical IDE will do the same, but will
trap and interpret the events in an entirely different manner that is
probably not even a little bit compatible with your program.  When
you run your program from inside *any* IDE, not just IDLE, it's a bit
of a lottery as to whether your program gets an event, or the IDE
does.  Chances are, *both* need to see it, at which point you're

It is possible to do this successfully, but only in a very limited
way and only if you're very careful.  If you think either of those
conditions hold, you are wrong.

> Second, maybe I missed it above, but when I posted the output from the  
> program that showed the failure, was there anything that said, "IDLE  
> problem" or would even give a clue that's the culprit?

How can it?  It's not IDLE's problem, it's yours.

> Finally, we can probably agree that I can continue to use IDLE for  
> editing and syntax checking, but to "guarantee" successful execution of  
> the program, I can just double-click on the py file in my folder.  
> Perhaps there is a better way than clicking on it in the folder.

Typing at a command prompt.

> For example, putting it on the desktop.

This causes an extra file read as Windows indirects through the desktop
link.  It's unlikely to be a noticeable delay at startup, but I'd
hesitate to call it "better".

> As I look at the folder, previous copies only differ by a digit, I can  
> easily find myself executing an earlier version, differing as Dev4, to  
> Dev5 at the end of each name.

I'd suggest spending a while reading up on version control systems.

Rhodri James *-* Wildebeeste Herder to the Masses

More information about the Python-list mailing list