Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-15 Thread Steve Holden
W. eWatson wrote:
> It looks like I got an accidentally case of send message 3 times. Well,
> here's a correct below.
>> The question now is what can I do about it? reboot?
>>
>> Just to re-iterate the answer I provided to *>the question to a post
>> above<*, I'm using Tkinter for the program's GUI.
>>
> 
> 
Just stop running the damned thing under IDLE.

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson
It looks like I got an accidentally case of send message 3 times. Well, 
here's a correct below.

The question now is what can I do about it? reboot?

Just to re-iterate the answer I provided to *>the question to a post above<*, I'm using 
Tkinter for the program's GUI.





--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson

So, how do I get rid of it? reboot?


Just to re-iterate the I provided the question to above, I'm using Tkinter 
for the program's GUI.



--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson



The two separate loops being PyWin (which uses MFC) and your program
(which uses Tkinter). You just can't mix GUIs in the same process like
that, sorry.

regards
 Stedve
--
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/


Deja-vu!

http://mail.python.org/pipermail/python-list/2001-March/076069.html

The question now is what can I do about it? reboot?

Just to re-iterate the answer I provided the answer to above, I'm using 
Tkinter for the program's GUI.


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson

drobi...@gmail.com wrote:

On Feb 11, 2:51 pm, Steve Holden  wrote:

W. eWatson wrote:

Steve Holden wrote:

W. eWatson wrote:

My program in IDLE bombed with:
==
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 552, in OperationalSettings
dialog = OperationalSettingsDialog( self.master, set_loc_dict )
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 81, in __init__
tkSimpleDialog.Dialog.__init__(self, parent)
  File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
self.wait_visibility() # window needs to be visible for the grab
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
self.tk.call('tkwait', 'visibility', window._w)
TclError: window ".34672232" was deleted before its visibility changed
===
It runs fine in pythonWin performing the same entry operation. Open a
menu,  select an item to open a dialog, select a select button in the
dialog, press OK to leave the dialog. Boom, as above.
(This does not mean pythonWin doesn't have problems of its own. ) If I
just execute the code (double click on the py file, the console shows no
problems. IDLE is unhappy.
Another side to this is that I use WinMerge to find differences between
my last saved copy and the current copy. I found the current copy had
two lines where a abc.get() was changed to abc.get. This was undoubtedly
from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
had no trouble executing the program. My guess is that while briefly
editing there, I hit some odd combination of keys that produced,
perhaps, an invisible character that pyWin ignores.
Not the 34672232 window is a dialog that I closed by pressing OK. I
would again guess, that, if there is a problem, it occurs in the code
that destroys the dialog.

Well you have to remember that you are trying to run a windowed GUI
under the control of another windows GUI, so it isn't surprising that
you hit trouble.
With IDLE the issue will be that IDLE already created a main window
before your program started running. With PythonWin you are using two
different toolkits, so it isn't really surprising that breaks down -
there will be two entirely separate main loops competing with each other.

Not quite. I take down IDLE when I run pyWin, and vice versa.

The two separate loops being PyWin (which uses MFC) and your program
(which uses Tkinter). You just can't mix GUIs in the same process like
that, sorry.

regards
 Stedve
--
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/


Deja-vu!

http://mail.python.org/pipermail/python-list/2001-March/076069.html

The question now is what can I do about it? reboot?

Just to re-iterate the answer I provided the answer to above, I'm using 
Tkinter for the program's GUI.


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson

drobi...@gmail.com wrote:

On Feb 11, 2:51 pm, Steve Holden  wrote:

W. eWatson wrote:

Steve Holden wrote:

W. eWatson wrote:

My program in IDLE bombed with:
==
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 552, in OperationalSettings
dialog = OperationalSettingsDialog( self.master, set_loc_dict )
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 81, in __init__
tkSimpleDialog.Dialog.__init__(self, parent)
  File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
self.wait_visibility() # window needs to be visible for the grab
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
self.tk.call('tkwait', 'visibility', window._w)
TclError: window ".34672232" was deleted before its visibility changed
===
It runs fine in pythonWin performing the same entry operation. Open a
menu,  select an item to open a dialog, select a select button in the
dialog, press OK to leave the dialog. Boom, as above.
(This does not mean pythonWin doesn't have problems of its own. ) If I
just execute the code (double click on the py file, the console shows no
problems. IDLE is unhappy.
Another side to this is that I use WinMerge to find differences between
my last saved copy and the current copy. I found the current copy had
two lines where a abc.get() was changed to abc.get. This was undoubtedly
from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
had no trouble executing the program. My guess is that while briefly
editing there, I hit some odd combination of keys that produced,
perhaps, an invisible character that pyWin ignores.
Not the 34672232 window is a dialog that I closed by pressing OK. I
would again guess, that, if there is a problem, it occurs in the code
that destroys the dialog.

Well you have to remember that you are trying to run a windowed GUI
under the control of another windows GUI, so it isn't surprising that
you hit trouble.
With IDLE the issue will be that IDLE already created a main window
before your program started running. With PythonWin you are using two
different toolkits, so it isn't really surprising that breaks down -
there will be two entirely separate main loops competing with each other.

Not quite. I take down IDLE when I run pyWin, and vice versa.

The two separate loops being PyWin (which uses MFC) and your program
(which uses Tkinter). You just can't mix GUIs in the same process like
that, sorry.

regards
 Stedve
--
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/


Deja-vu!

http://mail.python.org/pipermail/python-list/2001-March/076069.html

The question now is what can I do about it? reboot?

Just to re-iterate the answer I provided the answer to above, I'm using 
Tkinter for the program's GUI.


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread drobi...@gmail.com
On Feb 11, 2:51 pm, Steve Holden  wrote:
> W. eWatson wrote:
> > Steve Holden wrote:
> >> W. eWatson wrote:
> >>> My program in IDLE bombed with:
> >>> ==
> >>> Exception in Tkinter callback
> >>> Traceback (most recent call last):
> >>>   File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
> >>>     return self.func(*args)
> >>>   File
> >>> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
>
> >>> line 552, in OperationalSettings
> >>>     dialog = OperationalSettingsDialog( self.master, set_loc_dict )
> >>>   File
> >>> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
>
> >>> line 81, in __init__
> >>>     tkSimpleDialog.Dialog.__init__(self, parent)
> >>>   File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
> >>>     self.wait_visibility() # window needs to be visible for the grab
> >>>   File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
> >>>     self.tk.call('tkwait', 'visibility', window._w)
> >>> TclError: window ".34672232" was deleted before its visibility changed
> >>> ===
> >>> It runs fine in pythonWin performing the same entry operation. Open a
> >>> menu,  select an item to open a dialog, select a select button in the
> >>> dialog, press OK to leave the dialog. Boom, as above.
>
> >>> (This does not mean pythonWin doesn't have problems of its own. ) If I
> >>> just execute the code (double click on the py file, the console shows no
> >>> problems. IDLE is unhappy.
>
> >>> Another side to this is that I use WinMerge to find differences between
> >>> my last saved copy and the current copy. I found the current copy had
> >>> two lines where a abc.get() was changed to abc.get. This was undoubtedly
> >>> from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
> >>> had no trouble executing the program. My guess is that while briefly
> >>> editing there, I hit some odd combination of keys that produced,
> >>> perhaps, an invisible character that pyWin ignores.
>
> >>> Not the 34672232 window is a dialog that I closed by pressing OK. I
> >>> would again guess, that, if there is a problem, it occurs in the code
> >>> that destroys the dialog.
>
> >> Well you have to remember that you are trying to run a windowed GUI
> >> under the control of another windows GUI, so it isn't surprising that
> >> you hit trouble.
>
> >> With IDLE the issue will be that IDLE already created a main window
> >> before your program started running. With PythonWin you are using two
> >> different toolkits, so it isn't really surprising that breaks down -
> >> there will be two entirely separate main loops competing with each other.
>
> > Not quite. I take down IDLE when I run pyWin, and vice versa.
>
> The two separate loops being PyWin (which uses MFC) and your program
> (which uses Tkinter). You just can't mix GUIs in the same process like
> that, sorry.
>
> regards
>  Stedve
> --
> Steve Holden        +1 571 484 6266   +1 800 494 3119
> Holden Web LLC              http://www.holdenweb.com/

Deja-vu!

http://mail.python.org/pipermail/python-list/2001-March/076069.html
--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson

Mike Driscoll wrote:

On Feb 11, 3:27 pm, "W. eWatson"  wrote:

Steve Holden wrote:

W. eWatson wrote:

Steve Holden wrote:

W. eWatson wrote:

My program in IDLE bombed with:
==
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 552, in OperationalSettings
dialog = OperationalSettingsDialog( self.master, set_loc_dict )
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 81, in __init__
tkSimpleDialog.Dialog.__init__(self, parent)
  File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
self.wait_visibility() # window needs to be visible for the grab
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
self.tk.call('tkwait', 'visibility', window._w)
TclError: window ".34672232" was deleted before its visibility changed
===
It runs fine in pythonWin performing the same entry operation. Open a
menu,  select an item to open a dialog, select a select button in the
dialog, press OK to leave the dialog. Boom, as above.
(This does not mean pythonWin doesn't have problems of its own. ) If I
just execute the code (double click on the py file, the console shows no
problems. IDLE is unhappy.
Another side to this is that I use WinMerge to find differences between
my last saved copy and the current copy. I found the current copy had
two lines where a abc.get() was changed to abc.get. This was undoubtedly
from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
had no trouble executing the program. My guess is that while briefly
editing there, I hit some odd combination of keys that produced,
perhaps, an invisible character that pyWin ignores.
Not the 34672232 window is a dialog that I closed by pressing OK. I
would again guess, that, if there is a problem, it occurs in the code
that destroys the dialog.

Well you have to remember that you are trying to run a windowed GUI
under the control of another windows GUI, so it isn't surprising that
you hit trouble.
With IDLE the issue will be that IDLE already created a main window
before your program started running. With PythonWin you are using two
different toolkits, so it isn't really surprising that breaks down -
there will be two entirely separate main loops competing with each other.

Not quite. I take down IDLE when I run pyWin, and vice versa.

The two separate loops being PyWin (which uses MFC) and your program
(which uses Tkinter). You just can't mix GUIs in the same process like
that, sorry.
regards
 Stedve

I have no idea what MFC is or how it relates to Tkinter. Neither IDLE and
pyWin are being run together.

Assume neither is running.
a. run IDLE, and execute program
b. close IDLE script, and interactive window. Kill py program
result: boom
c. run pyWin and execute program
d. do same as b for pyWin
resulst: all OK
e. repeat a and b.
Result: boom

Repeat the above and you get the same results.

I had running IDLE successfully w/o using Pywin, and IDLE goofed, as above.
I switched to it to see if it work there. It did. I double clicked on the py
file, and it worked fine. Can you explain this?

--
W. eWatson

  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

 Web Page: 


What Steve (and I) are saying is that IDLE has it's own mainloop and
your program has a mainloop too as it sounds like it is running a
Tkinter app. Sometimes when you run a Tk app from another Tk app, the
two mainloops clash and have weird issue like this one.

If you just double-click it or run it from the command line, you only
have one mainloop (i.e. the one that's part of your app). Thus, no
conflicts.

Mike

So, how do I get rid of it? reboot?

--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Mike Driscoll
On Feb 11, 3:27 pm, "W. eWatson"  wrote:
> Steve Holden wrote:
> > W. eWatson wrote:
> >> Steve Holden wrote:
> >>> W. eWatson wrote:
>  My program in IDLE bombed with:
>  ==
>  Exception in Tkinter callback
>  Traceback (most recent call last):
>    File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
>      return self.func(*args)
>    File
>  "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
>
>  line 552, in OperationalSettings
>      dialog = OperationalSettingsDialog( self.master, set_loc_dict )
>    File
>  "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
>
>  line 81, in __init__
>      tkSimpleDialog.Dialog.__init__(self, parent)
>    File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
>      self.wait_visibility() # window needs to be visible for the grab
>    File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
>      self.tk.call('tkwait', 'visibility', window._w)
>  TclError: window ".34672232" was deleted before its visibility changed
>  ===
>  It runs fine in pythonWin performing the same entry operation. Open a
>  menu,  select an item to open a dialog, select a select button in the
>  dialog, press OK to leave the dialog. Boom, as above.
>
>  (This does not mean pythonWin doesn't have problems of its own. ) If I
>  just execute the code (double click on the py file, the console shows no
>  problems. IDLE is unhappy.
>
>  Another side to this is that I use WinMerge to find differences between
>  my last saved copy and the current copy. I found the current copy had
>  two lines where a abc.get() was changed to abc.get. This was undoubtedly
>  from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
>  had no trouble executing the program. My guess is that while briefly
>  editing there, I hit some odd combination of keys that produced,
>  perhaps, an invisible character that pyWin ignores.
>
>  Not the 34672232 window is a dialog that I closed by pressing OK. I
>  would again guess, that, if there is a problem, it occurs in the code
>  that destroys the dialog.
>
> >>> Well you have to remember that you are trying to run a windowed GUI
> >>> under the control of another windows GUI, so it isn't surprising that
> >>> you hit trouble.
>
> >>> With IDLE the issue will be that IDLE already created a main window
> >>> before your program started running. With PythonWin you are using two
> >>> different toolkits, so it isn't really surprising that breaks down -
> >>> there will be two entirely separate main loops competing with each other.
>
> >> Not quite. I take down IDLE when I run pyWin, and vice versa.
>
> > The two separate loops being PyWin (which uses MFC) and your program
> > (which uses Tkinter). You just can't mix GUIs in the same process like
> > that, sorry.
>
> > regards
> >  Stedve
>
> I have no idea what MFC is or how it relates to Tkinter. Neither IDLE and
> pyWin are being run together.
>
> Assume neither is running.
> a. run IDLE, and execute program
> b. close IDLE script, and interactive window. Kill py program
> result: boom
> c. run pyWin and execute program
> d. do same as b for pyWin
> resulst: all OK
> e. repeat a and b.
> Result: boom
>
> Repeat the above and you get the same results.
>
> I had running IDLE successfully w/o using Pywin, and IDLE goofed, as above.
> I switched to it to see if it work there. It did. I double clicked on the py
> file, and it worked fine. Can you explain this?
>
> --
>                                 W. eWatson
>
>               (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>                Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
>
>                      Web Page: 

What Steve (and I) are saying is that IDLE has it's own mainloop and
your program has a mainloop too as it sounds like it is running a
Tkinter app. Sometimes when you run a Tk app from another Tk app, the
two mainloops clash and have weird issue like this one.

If you just double-click it or run it from the command line, you only
have one mainloop (i.e. the one that's part of your app). Thus, no
conflicts.

Mike
--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson

Steve Holden wrote:

W. eWatson wrote:

Steve Holden wrote:

W. eWatson wrote:

My program in IDLE bombed with:
==
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",

line 552, in OperationalSettings
dialog = OperationalSettingsDialog( self.master, set_loc_dict )
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",

line 81, in __init__
tkSimpleDialog.Dialog.__init__(self, parent)
  File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
self.wait_visibility() # window needs to be visible for the grab
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
self.tk.call('tkwait', 'visibility', window._w)
TclError: window ".34672232" was deleted before its visibility changed
===
It runs fine in pythonWin performing the same entry operation. Open a
menu,  select an item to open a dialog, select a select button in the
dialog, press OK to leave the dialog. Boom, as above.

(This does not mean pythonWin doesn't have problems of its own. ) If I
just execute the code (double click on the py file, the console shows no
problems. IDLE is unhappy.

Another side to this is that I use WinMerge to find differences between
my last saved copy and the current copy. I found the current copy had
two lines where a abc.get() was changed to abc.get. This was undoubtedly
from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
had no trouble executing the program. My guess is that while briefly
editing there, I hit some odd combination of keys that produced,
perhaps, an invisible character that pyWin ignores.

Not the 34672232 window is a dialog that I closed by pressing OK. I
would again guess, that, if there is a problem, it occurs in the code
that destroys the dialog.



Well you have to remember that you are trying to run a windowed GUI
under the control of another windows GUI, so it isn't surprising that
you hit trouble.

With IDLE the issue will be that IDLE already created a main window
before your program started running. With PythonWin you are using two
different toolkits, so it isn't really surprising that breaks down -
there will be two entirely separate main loops competing with each other.


Not quite. I take down IDLE when I run pyWin, and vice versa.


The two separate loops being PyWin (which uses MFC) and your program
(which uses Tkinter). You just can't mix GUIs in the same process like
that, sorry.

regards
 Stedve
I have no idea what MFC is or how it relates to Tkinter. Neither IDLE and 
pyWin are being run together.


Assume neither is running.
a. run IDLE, and execute program
b. close IDLE script, and interactive window. Kill py program
result: boom
c. run pyWin and execute program
d. do same as b for pyWin
resulst: all OK
e. repeat a and b.
Result: boom

Repeat the above and you get the same results.

I had running IDLE successfully w/o using Pywin, and IDLE goofed, as above. 
I switched to it to see if it work there. It did. I double clicked on the py 
file, and it worked fine. Can you explain this?



--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Steve Holden
W. eWatson wrote:
> Steve Holden wrote:
>> W. eWatson wrote:
>>> My program in IDLE bombed with:
>>> ==
>>> Exception in Tkinter callback
>>> Traceback (most recent call last):
>>>   File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
>>> return self.func(*args)
>>>   File
>>> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
>>>
>>> line 552, in OperationalSettings
>>> dialog = OperationalSettingsDialog( self.master, set_loc_dict )
>>>   File
>>> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
>>>
>>> line 81, in __init__
>>> tkSimpleDialog.Dialog.__init__(self, parent)
>>>   File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
>>> self.wait_visibility() # window needs to be visible for the grab
>>>   File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
>>> self.tk.call('tkwait', 'visibility', window._w)
>>> TclError: window ".34672232" was deleted before its visibility changed
>>> ===
>>> It runs fine in pythonWin performing the same entry operation. Open a
>>> menu,  select an item to open a dialog, select a select button in the
>>> dialog, press OK to leave the dialog. Boom, as above.
>>>
>>> (This does not mean pythonWin doesn't have problems of its own. ) If I
>>> just execute the code (double click on the py file, the console shows no
>>> problems. IDLE is unhappy.
>>>
>>> Another side to this is that I use WinMerge to find differences between
>>> my last saved copy and the current copy. I found the current copy had
>>> two lines where a abc.get() was changed to abc.get. This was undoubtedly
>>> from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
>>> had no trouble executing the program. My guess is that while briefly
>>> editing there, I hit some odd combination of keys that produced,
>>> perhaps, an invisible character that pyWin ignores.
>>>
>>> Not the 34672232 window is a dialog that I closed by pressing OK. I
>>> would again guess, that, if there is a problem, it occurs in the code
>>> that destroys the dialog.
>>>
>>>
>> Well you have to remember that you are trying to run a windowed GUI
>> under the control of another windows GUI, so it isn't surprising that
>> you hit trouble.
>>
>> With IDLE the issue will be that IDLE already created a main window
>> before your program started running. With PythonWin you are using two
>> different toolkits, so it isn't really surprising that breaks down -
>> there will be two entirely separate main loops competing with each other.
>>
> Not quite. I take down IDLE when I run pyWin, and vice versa.
> 
The two separate loops being PyWin (which uses MFC) and your program
(which uses Tkinter). You just can't mix GUIs in the same process like
that, sorry.

regards
 Stedve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson

Steve Holden wrote:

W. eWatson wrote:

My program in IDLE bombed with:
==
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 552, in OperationalSettings
dialog = OperationalSettingsDialog( self.master, set_loc_dict )
  File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 81, in __init__
tkSimpleDialog.Dialog.__init__(self, parent)
  File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
self.wait_visibility() # window needs to be visible for the grab
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
self.tk.call('tkwait', 'visibility', window._w)
TclError: window ".34672232" was deleted before its visibility changed
===
It runs fine in pythonWin performing the same entry operation. Open a
menu,  select an item to open a dialog, select a select button in the
dialog, press OK to leave the dialog. Boom, as above.

(This does not mean pythonWin doesn't have problems of its own. ) If I
just execute the code (double click on the py file, the console shows no
problems. IDLE is unhappy.

Another side to this is that I use WinMerge to find differences between
my last saved copy and the current copy. I found the current copy had
two lines where a abc.get() was changed to abc.get. This was undoubtedly
from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
had no trouble executing the program. My guess is that while briefly
editing there, I hit some odd combination of keys that produced,
perhaps, an invisible character that pyWin ignores.

Not the 34672232 window is a dialog that I closed by pressing OK. I
would again guess, that, if there is a problem, it occurs in the code
that destroys the dialog.



Well you have to remember that you are trying to run a windowed GUI
under the control of another windows GUI, so it isn't surprising that
you hit trouble.

With IDLE the issue will be that IDLE already created a main window
before your program started running. With PythonWin you are using two
different toolkits, so it isn't really surprising that breaks down -
there will be two entirely separate main loops competing with each other.

regards
 Steve

Not quite. I take down IDLE when I run pyWin, and vice versa.

--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson

Mike Driscoll wrote:

On Feb 11, 10:28 am, "W. eWatson"  wrote:

My program in IDLE bombed with:
==
Exception in Tkinter callback
Traceback (most recent call last):
   File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
 return self.func(*args)
   File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 552, in OperationalSettings
 dialog = OperationalSettingsDialog( self.master, set_loc_dict )
   File
"C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
line 81, in __init__
 tkSimpleDialog.Dialog.__init__(self, parent)
   File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
 self.wait_visibility() # window needs to be visible for the grab
   File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
 self.tk.call('tkwait', 'visibility', window._w)
TclError: window ".34672232" was deleted before its visibility changed
===
It runs fine in pythonWin performing the same entry operation. Open a menu,
  select an item to open a dialog, select a select button in the dialog,
press OK to leave the dialog. Boom, as above.

(This does not mean pythonWin doesn't have problems of its own. ) If I just
execute the code (double click on the py file, the console shows no
problems. IDLE is unhappy.

Another side to this is that I use WinMerge to find differences between my
last saved copy and the current copy. I found the current copy had two lines
where a abc.get() was changed to abc.get. This was undoubtedly from briefly
using the pyWin editor, when I mis-hit some keys. Yet pyWin had no trouble
executing the program. My guess is that while briefly editing there, I hit
some odd combination of keys that produced, perhaps, an invisible character
that pyWin ignores.

Note the 34672232 window is a dialog that I closed by pressing OK. I would
again guess, that, if there is a problem, it occurs in the code that
destroys the dialog.




You don't really say what your code does or if it uses a GUI toolkit
and if so, which one. But my guess is that you are using some kind of
GUI and its GUI and IDLE's are clashing somehow. I see this sort of
thing with some of my wxPython programs from time to time, although
IDLE usually just crashes with no error message.

I would recommend using the command line or something that can open it
in a completely separate process, such as Wingware's IDE.

Mike
Tkinter. Isn't just clicking on the py file enough to side step either of 
the two? I did it and it worked fine. The code is for a GUI that has five or 
 so menus on the main window bar, and manipulates video that is downloaded 
to it from a video camera. The problem occurs in a dialog in which a user 
enters configuration values, like the time to start/stop the camera. As soon 
as I press OK on the dialog the program dies as above. It wasn't doing that 
at all for days despite some heavy editing. A WinMerge shows its quite 
faithful to it's last working predecessor. That's how I found the get problem.


--
   W. eWatson

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: 

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Steve Holden
W. eWatson wrote:
> My program in IDLE bombed with:
> ==
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
> return self.func(*args)
>   File
> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
> line 552, in OperationalSettings
> dialog = OperationalSettingsDialog( self.master, set_loc_dict )
>   File
> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
> line 81, in __init__
> tkSimpleDialog.Dialog.__init__(self, parent)
>   File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
> self.wait_visibility() # window needs to be visible for the grab
>   File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
> self.tk.call('tkwait', 'visibility', window._w)
> TclError: window ".34672232" was deleted before its visibility changed
> ===
> It runs fine in pythonWin performing the same entry operation. Open a
> menu,  select an item to open a dialog, select a select button in the
> dialog, press OK to leave the dialog. Boom, as above.
> 
> (This does not mean pythonWin doesn't have problems of its own. ) If I
> just execute the code (double click on the py file, the console shows no
> problems. IDLE is unhappy.
> 
> Another side to this is that I use WinMerge to find differences between
> my last saved copy and the current copy. I found the current copy had
> two lines where a abc.get() was changed to abc.get. This was undoubtedly
> from briefly using the pyWin editor, when I mis-hit some keys. Yet pyWin
> had no trouble executing the program. My guess is that while briefly
> editing there, I hit some odd combination of keys that produced,
> perhaps, an invisible character that pyWin ignores.
> 
> Not the 34672232 window is a dialog that I closed by pressing OK. I
> would again guess, that, if there is a problem, it occurs in the code
> that destroys the dialog.
> 
> 
Well you have to remember that you are trying to run a windowed GUI
under the control of another windows GUI, so it isn't surprising that
you hit trouble.

With IDLE the issue will be that IDLE already created a main window
before your program started running. With PythonWin you are using two
different toolkits, so it isn't really surprising that breaks down -
there will be two entirely separate main loops competing with each other.

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Mike Driscoll
On Feb 11, 10:28 am, "W. eWatson"  wrote:
> My program in IDLE bombed with:
> ==
> Exception in Tkinter callback
> Traceback (most recent call last):
>    File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
>      return self.func(*args)
>    File
> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
> line 552, in OperationalSettings
>      dialog = OperationalSettingsDialog( self.master, set_loc_dict )
>    File
> "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sentuserNC25-Dev4.py",
> line 81, in __init__
>      tkSimpleDialog.Dialog.__init__(self, parent)
>    File "C:\Python25\lib\lib-tk\tkSimpleDialog.py", line 69, in __init__
>      self.wait_visibility() # window needs to be visible for the grab
>    File "C:\Python25\lib\lib-tk\Tkinter.py", line 415, in wait_visibility
>      self.tk.call('tkwait', 'visibility', window._w)
> TclError: window ".34672232" was deleted before its visibility changed
> ===
> It runs fine in pythonWin performing the same entry operation. Open a menu,
>   select an item to open a dialog, select a select button in the dialog,
> press OK to leave the dialog. Boom, as above.
>
> (This does not mean pythonWin doesn't have problems of its own. ) If I just
> execute the code (double click on the py file, the console shows no
> problems. IDLE is unhappy.
>
> Another side to this is that I use WinMerge to find differences between my
> last saved copy and the current copy. I found the current copy had two lines
> where a abc.get() was changed to abc.get. This was undoubtedly from briefly
> using the pyWin editor, when I mis-hit some keys. Yet pyWin had no trouble
> executing the program. My guess is that while briefly editing there, I hit
> some odd combination of keys that produced, perhaps, an invisible character
> that pyWin ignores.
>
> Not the 34672232 window is a dialog that I closed by pressing OK. I would
> again guess, that, if there is a problem, it occurs in the code that
> destroys the dialog.
>
> --
>                                 W. eWatson
>
>               (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>                Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
>
>                      Web Page: 

You don't really say what your code does or if it uses a GUI toolkit
and if so, which one. But my guess is that you are using some kind of
GUI and its GUI and IDLE's are clashing somehow. I see this sort of
thing with some of my wxPython programs from time to time, although
IDLE usually just crashes with no error message.

I would recommend using the command line or something that can open it
in a completely separate process, such as Wingware's IDE.

Mike
--
http://mail.python.org/mailman/listinfo/python-list