git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
		
			
				
	
	
		
			36 lines
		
	
	
		
			827 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			827 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| """PyAlaModeTest is a programmer's editor."""
 | |
| 
 | |
| __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
 | |
| __cvsid__ = "$Id$"
 | |
| __revision__ = "$Revision$"[11:-2]
 | |
| 
 | |
| 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):
 | |
|         wx.InitAllImageHandlers()
 | |
|         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)
 |