]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/wx/py/PyAlaMode.py
Added __nonzero__ for wxTraskBarIcon
[wxWidgets.git] / wxPython / wx / py / PyAlaMode.py
... / ...
CommitLineData
1"""PyAlaMode is a programmer's editor."""
2
3__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
4__cvsid__ = "$Id$"
5__revision__ = "$Revision$"[11:-2]
6
7import wx
8
9import os
10import sys
11
12import editor
13
14class App(wx.App):
15 """PyAlaMode 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.EditorNotebookFrame(filename=self.filename)
24 self.frame.Show()
25 self.SetTopWindow(self.frame)
26 return True
27
28def main(filename=None):
29 if not filename and len(sys.argv) > 1:
30 filename = sys.argv[1]
31 if filename:
32 filename = os.path.realpath(filename)
33 app = App(filename)
34 app.MainLoop()
35
36if __name__ == '__main__':
37 main()