Menu

#383 Program runs in idle, crashes pythonwin

open
pythonwin (177)
5
2008-10-06
2008-10-04
paul hide
No

I'm not sure whether this is the sort of thing that is of interest or not, but in case it is.
The following code and events cause pythonwin to crash, but in Idle it runs as expected.
Win xp
python 2.5.2

import Console #downloaded from effbot.org
cons = Console.getconsole()
#dos box pops up, close it using X, pythonwin crashes
#in Idle it runs ok

Paul Hide

Discussion

  • Roger Upole

    Roger Upole - 2008-10-06
    • assigned_to: nobody --> rupole
     
  • Roger Upole

    Roger Upole - 2008-10-06

    You can also get the same effect using win32console.AllocConsole()
    from Pythonwin. I think MFC is not playing nice with the console
    Api's. At one time, I tried using a console control handler
    (win32api.SetConsoleCtrlHandler). This stops pythonwin from
    crashing, but you get the 'Windows cannot end this program'
    dialog when you try to close the console.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.