[pywin32-bugs] [ pywin32-Bugs-745699 ] Error handling: not playing nice with Tkinter? (W98)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2008-02-19 02:50:36
|
Bugs item #745699, was opened at 2003-05-29 14:27 Message generated for change (Settings changed) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=745699&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: pythonwin Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Philip Reed (philipreed) Assigned to: Nobody/Anonymous (nobody) Summary: Error handling: not playing nice with Tkinter? (W98) Initial Comment: When PythonWin is executing a TKInter script and something goes wrong, things apparently get left in queue for the next (correct) execution. This causes weirdness in the GUI interaction eventually leading PythonWin to crash. Not 100% sure it's PyWin and not TkInter's problem, but I started with the more likely suspect IMO. TO REPRODUCE: 1. start PythonWin 2. New python script 3. Paste in Example 3.1 from <http://www.pythonware.com/library/tkinter/introducti on/hello-again.htm> (a TkInter "Hello World" example). 4. Add some line that's guaranteed to error, like "import dummy", BEFORE the call to root.mainloop () 5. Save the file somewhere not in the Python path, e.g. under a subdir of My Documents . 6. Run with an <F5> OBSERVE: normal exception message in interactive window. 6. Fix the "problem" by deleting the bogus import line. 7. Run again with <F5> ACTUAL RESULT: Now you get two TKInter dialog boxes! Pressing Quit on the 2nd one doesn't really quit, and pressing a few more buttons (e.g. Quit on the first, Hello on the second, Quit on the second -- I think that was my order) will cause an error: Runtime Error! Program <path to pythonwin> PYTHONWIN.EXE abnormal program termination EXPECTED RESULT: PythonWin should be robust enough to handle this. I think. :-) If possible, it should clear out the queue of windows so the first dialog never gets displayed. Certainly they shouldn't both display at the same time. ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2008-02-18 21:50 Message: Logged In: YES user_id=771074 Originator: NO Running 2 GUI frameworks at the same time will almost always cause problems of this kind. There's really no resolution except to not run Tkintker from within pythonwin. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=745699&group_id=78018 |