#383 Program runs in idle, crashes pythonwin

pythonwin (176)
paul hide

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


  • 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.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks