One shell for each editor; good for testing namespace issues.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
44
wxPython/wxPython/py/PyAlaModeTest.py
Executable file
44
wxPython/wxPython/py/PyAlaModeTest.py
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""PyAlaModeTest is a programmer's editor."""
|
||||
|
||||
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
|
||||
__cvsid__ = "$Id$"
|
||||
__revision__ = "$Revision$"[11:-2]
|
||||
|
||||
from wxPython import wx
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import editor
|
||||
|
||||
try:
|
||||
True
|
||||
except NameError:
|
||||
True = 1==1
|
||||
False = 1==0
|
||||
|
||||
class App(wx.wxApp):
|
||||
"""PyAlaModeTest standalone application."""
|
||||
|
||||
def __init__(self, filename=None):
|
||||
self.filename = filename
|
||||
wx.wxApp.__init__(self, redirect=False)
|
||||
|
||||
def OnInit(self):
|
||||
wx.wxInitAllImageHandlers()
|
||||
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)
|
Reference in New Issue
Block a user