]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/py/PyAlaModeTest.py
Rename the .tar.gz to a .tgz
[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 try:
15 True
16 except NameError:
17 True = 1==1
18 False = 1==0
19
20 class App(wx.App):
21 """PyAlaModeTest standalone application."""
22
23 def __init__(self, filename=None):
24 self.filename = filename
25 wx.App.__init__(self, redirect=False)
26
27 def OnInit(self):
28 wx.InitAllImageHandlers()
29 self.frame = editor.EditorShellNotebookFrame(filename=self.filename)
30 self.frame.Show()
31 self.SetTopWindow(self.frame)
32 return True
33
34 def main(filename=None):
35 app = App(filename)
36 app.MainLoop()
37
38 if __name__ == '__main__':
39 filename = None
40 if len(sys.argv) > 1:
41 filename = os.path.realpath(sys.argv[1])
42 main(filename)