]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/py/PyAlaModeTest.py
Allow wxApp::MacOpenFile, MacPrintFile, MacNewFile, and MacReopenApp
[wxWidgets.git] / wxPython / wx / py / PyAlaModeTest.py
1 """PyAlaModeTest is a programmer's editor."""
2
3 __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
4 __cvsid__ = "$Id$"
5 __revision__ = "$Revision$"[11:-2]
6
7 import wx
8
9 import os
10 import sys
11
12 import editor
13
14 class App(wx.App):
15 """PyAlaModeTest standalone application."""
16
17 def __init__(self, filename=None):
18 self.filename = filename
19 wx.App.__init__(self, redirect=False)
20
21 def OnInit(self):
22 wx.InitAllImageHandlers()
23 self.frame = editor.EditorShellNotebookFrame(filename=self.filename)
24 self.frame.Show()
25 self.SetTopWindow(self.frame)
26 return True
27
28 def main(filename=None):
29 app = App(filename)
30 app.MainLoop()
31
32 if __name__ == '__main__':
33 filename = None
34 if len(sys.argv) > 1:
35 filename = os.path.realpath(sys.argv[1])
36 main(filename)