]> git.saurik.com Git - wxWidgets.git/blame - wxPython/wx/py/PyAlaMode.py
new encoding constants
[wxWidgets.git] / wxPython / wx / py / PyAlaMode.py
CommitLineData
d14a1e28 1"""PyAlaMode is a programmer's editor."""
1fded56b 2
d14a1e28
RD
3__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
4__cvsid__ = "$Id$"
5__revision__ = "$Revision$"[11:-2]
1fded56b 6
d14a1e28
RD
7import wx
8
9import os
10import sys
11
12import editor
13
14try:
15 True
16except NameError:
17 True = 1==1
18 False = 1==0
19
20class App(wx.App):
21 """PyAlaMode 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.EditorNotebookFrame(filename=self.filename)
30 self.frame.Show()
31 self.SetTopWindow(self.frame)
32 return True
33
34def main(filename=None):
35 if not filename and len(sys.argv) > 1:
36 filename = sys.argv[1]
37 if filename:
38 filename = os.path.realpath(filename)
39 app = App(filename)
40 app.MainLoop()
8b9a4190
RD
41
42if __name__ == '__main__':
43 main()