My app immediately crashes when I click the "[+]" next to one of my own
variables in the PyCrust "filling" tree view: "Illegal instruction"
That's for wxPython 2407 which I just built tonight. In 2402 I used to
get a "Segmentation fault" instead. With either version, the behavior
is fairly consistent.
Note that I can see the variable under "Ingredients". And I can click on
it. I just can't expand it.
My PyCrust set up is:
def makePythonPanel(self, parent):
from wxPython.lib.PyCrust import shell, version, filling
splitter = wx.SplitterWindow(parent, -1, size=(640, 480))
shellWin = shell.Shell(splitter, -1, introText="Welcome to \
PyCrust %s" % version.VERSION)
namespace = shellWin.interp.locals
assert isinstance(namespace, dict)
namespace['appFrame'] = self # <------ troublemaker
browserWin = filling.Filling(splitter, -1, size=(640, 480),
rootObject=namespace, rootIsNamespace=1)
splitter.splitHorizontally(shellWin, browserWin)
return splitter
If I comment out the "namespace['appFrame'] = self", the problem goes
away, but so does my ability to inspect what's interesting. The "self"
is a subclass of (wx.Frame, wxColumnSorterMixin).
** LIGHT BULB ***
Is this an infinite recursion problem from adding "self" to a PyCrust
Filling window that is ultimately contained by self?
It appears so. If I just make up a class with some attributes everything
works.
So I guess this needs to be fixed somehow. But also, is there a way I
can get this to work now? I just want to put PyCrust in a page in the
notebook that my application already had. Is no one doing this?
···
--
Chuck
http://ChuckEsterbrook.com