Poodletooth-iLand/panda/python/Lib/site-packages/wx/py/PyAlaModeTest.py
2015-03-06 06:11:40 -06:00

33 lines
761 B
Python

#!/usr/bin/env python
"""PyAlaModeTest is a programmer's editor."""
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
import wx
from wx import py
import os
import sys
class App(wx.App):
"""PyAlaModeTest standalone application."""
def __init__(self, filename=None):
self.filename = filename
wx.App.__init__(self, redirect=False)
def OnInit(self):
self.frame = py.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)