[Tutor] IDLE/phythonWin -- Who's On First? (Abbott and Costello)

ALAN GAULD alan.gauld at btinternet.com
Thu Feb 12 09:32:14 CET 2009


There used to be a lot of problems running Tkinter 
programs inside IDLE but most of these have been 
solved since about v2.3. However it does still 
through up issues, so the simple solution it to 
always test GUI programs outside of the IDE.


Another reason why for serious programming 
I tend to favour the 3 window setup...

Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/





________________________________
From: Wayne Watson <sierra_mtnview at sbcglobal.net>
To: Alan Gauld <alan.gauld at btinternet.com>; "tutor at python.org" <tutor at python.org>
Sent: Thursday, 12 February, 2009 5:09:01 AM
Subject: Re: [Tutor] IDLE/phythonWin -- Who's On First? (Abbott and Costello)

 This appears to be an old problem. <http://mail.python.org/pipermail/python-list/2001-March/076069.html>.
However, the question remains. What to do about it? reboot? I killed
about a dozen pythonwin.exe task, but to no avail. 

Wayne Watson wrote: 
Using WinMerge, I found a difference between the two that shouldn't
have been, but it didn't solve the problem.

dialog.rateVar.get() versus dialog.rateVar.get

There was another like it with get(), but it wouldn't have been
executed in my test run. 

I suspect something else like that lurks in the code.

Wayne Watson wrote: 
I ran it w/o using either IDLE/pyWin, and it worked without any
messages, as shown by the console window. Isn't this the same as using
the console? 

Outside of the two, my guess is that some subtle was made to the code,
accidentally, and one tolerates it and the other doesn't. I'm going to
do a WinMerge compare between the current py and a slightly older one. 

Alan Gauld wrote: 

"Wayne Watson" <sierra_mtnview at sbcglobal.net> wrote 


Signature.htmlMy program in IDLE bombed
with: 
============== 
Exception in Tkinter callback 
Traceback (most recent call last): 
   dialog = OperationalSettingsDialog( self.master, set_loc_dict ) 
   tkSimpleDialog.Dialog.__init__(self, parent) 
   self.wait_visibility() # window needs to be visible for the grab 


But runs fine in pythonWin performing the
same entry operation. 

Lets eliminate some variables by avoiding any IDEs. 

Does it work OK when run from a DOS console? 
Or if you just double click the file in Windows explorer? 

If it does that means its some kind of interaction between the program 
and IDLE. This is not unusual since IDLE is itself a Tkinter program 
and although recent versions are much better behaved with Tkinter 
it can still cause some strangeness. 

If you still get an error running outside the IDE then we can analyze 
it more closely. For that we will need the code, at least the function 
that calls the dialog. And if its a subclass the dialog class too. 



-- 
Signature.html 
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
 
The Richard Feynman
Problem-Solving
Algorithm:
  (1) write down the problem;
  (2) think very hard;
  (3) write down the answer.

                    Web Page: <www.speckledwithstars.net/>

________________________________

_______________________________________________
Tutor maillist  -  Tutor at python.org http://mail.python.org/mailman/listinfo/tutor 

-- 
Signature.html 
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
 
The Richard Feynman
Problem-Solving
Algorithm:
  (1) write down the problem;
  (2) think very hard;
  (3) write down the answer.

                    Web Page: <www.speckledwithstars.net/>

________________________________

_______________________________________________
Tutor maillist  -  Tutor at python.org http://mail.python.org/mailman/listinfo/tutor 

-- 
Signature.html 
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
 
The Richard Feynman Problem-Solving
Algorithm:
  (1) write down the problem;
  (2) think very hard;
  (3) write down the answer.

                    Web Page: <www.speckledwithstars.net/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090212/769b836d/attachment-0001.htm>


More information about the Tutor mailing list