]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/py/PyAlaModeTest.py
Merged the wxPy_newswig branch into the HEAD branch (main trunk)
[wxWidgets.git] / wxPython / wx / py / PyAlaModeTest.py
diff --git a/wxPython/wx/py/PyAlaModeTest.py b/wxPython/wx/py/PyAlaModeTest.py
new file mode 100755 (executable)
index 0000000..57b52e4
--- /dev/null
@@ -0,0 +1,42 @@
+"""PyAlaModeTest is a programmer's editor."""
+
+__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
+__cvsid__ = "$Id$"
+__revision__ = "$Revision$"[11:-2]
+
+import wx
+
+import os
+import sys
+
+import editor
+
+try:
+    True
+except NameError:
+    True = 1==1
+    False = 1==0
+
+class App(wx.App):
+    """PyAlaModeTest standalone application."""
+
+    def __init__(self, filename=None):
+        self.filename = filename
+        wx.App.__init__(self, redirect=False)
+
+    def OnInit(self):
+        wx.InitAllImageHandlers()
+        self.frame = editor.EditorShellNotebookFrame(filename=self.filename)
+        self.frame.Show()
+        self.SetTopWindow(self.frame)
+        return True
+
+def main(filename=None):
+    app = App(filename)
+    app.MainLoop()
+
+if __name__ == '__main__':
+    filename = None
+    if len(sys.argv) > 1:
+        filename = os.path.realpath(sys.argv[1])
+    main(filename)