Hi all
I'm new with Python/wxPython and I always have this
very boring problem.
Every time I run a code with an error, python
closes and I have no guess about what is wrong.
In particular I'm trying to find out how to
embed pyCrust in mine application,
I've found the code-snippet that follow,
that create a wxWindow and a PyCrust.
The program start, but when I try to
type something at the shell (also symply pressing enter)
it crashes.
If I run the program from inside a debugger,
I'm tryng HAP,IDLE,..., the debugger crashes too.
So, the question is :
How do you manage thes kind of problem,
there is a debugger that work ?
-- many thanks -- Silvano
···
-----------------------------------------------
import sys, os
from wxPython.wx import *
from wxPython.lib.PyCrust import shell
from wxPython.lib.PyCrust.crust import CrustFrame
class ShellFrame(wxFrame):
def __init__(self, parent=None, id=-1, title='PyCrust Minimus'):
wxFrame.__init__(self, parent, id, title)
self.shell = shell(parent=self)
class App(wxApp):
def OnInit(self):
self.frame = ShellFrame()
self.frame.Show(true)
self.SetTopWindow(self.frame)
return true
def main():
application = App(0)
application.MainLoop()
if __name__ == '__main__':
main()
raw_input()