pythonwin crash (used to work) - please help quick.

S

Stevie_mac

OS=XP, Python 2.3, wx2.5.1.5u
Not sure what's to blame here - or to be more precise, how to fix it!...

If I do this in PythonWin...
import wx
d = wx.Dialog(None, -1, 'title')
BANG - IDE crashes


If I do this in PyShell...
import wx
d = wx.Dialog(None, -1, 'title')
d.ShowModal()
# Excellent - no problem!


Thing is, it used to work! So I reinstalled PythonWin & wxPython - but still No Good.



'******************* Errors when PythonWin crashes *************************
Faulting application pythonwin.exe, version 2.3.2.163, faulting module wxbase251uh_vc.dll, version 0.0.0.0, fault
address 0x0003560a.

Faulting application pythonwin.exe, version 2.3.2.163, faulting module mfc42.dll, version 6.0.8665.0, fault address
0x00001c65.
 
P

Paul Prescod

Stevie_mac said:
OS=XP, Python 2.3, wx2.5.1.5u
Not sure what's to blame here - or to be more precise, how to fix it!...

If I do this in PythonWin...
import wx
d = wx.Dialog(None, -1, 'title')
BANG - IDE crashes

It typically doesn't work to have two GUIs in one process. PythonWin
uses MFC. Wx is a totally different GUI.

Paul Prescod
 
S

Stevie_Mac

I think seen somthing like this on net somewhere when i was searching.

So if I understand this, a python GUI can't debug a script that uses code
from any other GUI implementation (like wx for example)?

If so, dang! Whats my options - different IDE - or - no debug!

wait, im sure when I tried to run the script direct (through python and
pythonw) it still bombed - but in pyShell it didn't - hows that?

Stevie_Mac :confused:
 
S

Stevie_Mac

I think seen somthing like this on net somewhere when i was searching.

So if I understand this, a python GUI can't debug a script that uses code
from any other GUI implementation (like wx for example)?

If so, dang! Whats my options - different IDE - or - no debug!

wait, im sure when I tried to run the script direct (through python and
pythonw) it still bombed - but in pyShell it didn't - hows that?

Stevie_Mac :confused:
 
S

Stevie_Mac

I think seen somthing like this on net somewhere when i was searching.

So if I understand this, a python GUI can't debug a script that uses code
from any other GUI implementation (like wx for example)?

If so, dang! Whats my options - different IDE - or - no debug!

wait, im sure when I tried to run the script direct (through python and
pythonw) it still bombed - but in pyShell it didn't - hows that?

Stevie_Mac :confused:
 
S

Stevie_Mac

Oopsyay on the ultiplemay ostspay :)

Paul Prescod said:
It typically doesn't work to have two GUIs in one process. PythonWin
uses MFC. Wx is a totally different GUI.

Paul Prescod
 
N

Neil Hodgson

Stevie_Mac:
So if I understand this, a python GUI can't debug a script that uses code
from any other GUI implementation (like wx for example)?

The problems often occur when a GUI debugger is trying to run in the same
process as the target and there are clashes.
If so, dang! Whats my options - different IDE - or - no debug!

Running the target in another process as is done by some debuggers is
often more robust. IIRC, the current version of Idle, HAP Debugger, Wing
IDE, and Komodo can work in this manner. I'd recommend having a look at HAP
Debugger which works on Windows, is free and fairly simple. Then if you need
something more comprehensive look at the commercial products.

Neil
 
R

Richard James

Stevie_Mac said:
I think seen somthing like this on net somewhere when i was searching.

So if I understand this, a python GUI can't debug a script that uses code
from any other GUI implementation (like wx for example)?

If so, dang! Whats my options - different IDE - or - no debug!

wait, im sure when I tried to run the script direct (through python and
pythonw) it still bombed - but in pyShell it didn't - hows that?

Stevie_Mac :confused:

If you are still desperate and can't find something and if you don't
mind using old fashioned print statements to debug your code. I like
to use the SciTE editor.

http://www.scintilla.org/SciTE.html

A nice version by Bruce Dodson with Windows Installer and extra tools.
http://gisdeveloper.tripod.com/scite.html

You enter your code in one panel, press F5 to run, and Scite captures
the program's print statement output and Python errors in a second
panel.
Edit code errors and repeat. Note: Press Shift F5 to clear output
panel.

-- R.J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top