#!/usr/bin/env python
"""PyCrustApp is a python shell and namespace browser application."""

__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
__cvsid__ = "$Id: PyCrustApp.py,v 1.2 2001/12/10 22:45:02 RD Exp $"
__version__ = "$Revision: 1.2 $"[11:-2]

from wxPython.wx import *
from crust import CrustFrame


class App(wxApp):
    """PyCrust standalone application."""

    def OnInit(self):
        locals = {'__app__': 'PyCrust Standalone Application'}
        self.crustFrame = CrustFrame(locals=locals, size=(800,600))
        self.crustFrame.Show(true)
        self.SetTopWindow(self.crustFrame)
        # Add the application object to the sys module's namespace.
        # This allows a shell user to do:
        # >>> import sys
        # >>> sys.application.whatever
        import sys
        sys.application = self
        return true


def main():
    application = App(0)
    application.MainLoop()

if __name__ == '__main__':
    main()


