how do I start PyCrust?

7stud bbxx789_05ss at yahoo.com
Tue Jun 5 17:54:07 PDT 2007


Cody Precord <codyprecord <at> gmail.com> writes:

> 
> pywrap is probably just not on your path,
> 
> try:
> $ /usr/local/bin/pywrap
> 

Thanks.  However, I couldn't get the example on p. 102 to work.

1)  This is the example code:
----
import wx

class MyFrame(wx.Frame):
    pass

class MyApp(wx.App):
    def OnInit(self):
        self.frame = MyFrame(None, -1, "Test")
        self.frame.Show()
        self.SetTopWindow(self.frame)
        return True

app = MyApp()
app.MainLoop()
------

2) I did a pywrap like this:

$ /usr/local/bin/pywrap wxPython1.py

3) The "Test" window appeared.  I closed the Test window out, and then 
the pycrust window appeared along with another Test window hidden behind it.


4)  I typed in this stuff:

>>> import wx
>>> app.frame.panel = wx.Panel(parent=app.frame)
>>> app.frame.panel.SetBackgroundColour("blue")
True
>>> app.frame.panel.Refresh()
>>> 

and nothing happened; nothing in the Test window changed.  Any ideas?






More information about the wxpython-users mailing list