+class ShellFrame(wxFrame, ShellMenu):
+ """Frame containing the PyCrust shell component."""
+
+ name = 'PyCrust Shell Frame'
+ revision = __version__
+
+ def __init__(self, parent=None, id=-1, title='PyShell', \
+ pos=wxDefaultPosition, size=wxDefaultSize, \
+ style=wxDEFAULT_FRAME_STYLE, locals=None, \
+ InterpClass=None, *args, **kwds):
+ """Create a PyCrust ShellFrame instance."""
+ wxFrame.__init__(self, parent, id, title, pos, size, style)
+ intro = 'Welcome To PyCrust %s - The Flakiest Python Shell' % VERSION
+ self.CreateStatusBar()
+ self.SetStatusText(intro)
+ if wxPlatform == '__WXMSW__':
+ icon = wxIcon('PyCrust.ico', wxBITMAP_TYPE_ICO)
+ self.SetIcon(icon)
+ self.shell = Shell(parent=self, id=-1, introText=intro, \
+ locals=locals, InterpClass=InterpClass, \
+ *args, **kwds)
+ # Override the shell so that status messages go to the status bar.
+ self.shell.setStatusText = self.SetStatusText
+ self.createMenus()
+
+