1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
###############################################################################
# Name: XXXDemo.py #
# Purpose: #
# Author: Cody Precord <cprecord@editra.org> #
# Copyright: (c) 2009 Cody Precord <staff@editra.org> #
# Licence: wxWindows Licence #
###############################################################################
"""
Test file for testing the XXX control
"""
__author__ = "Cody Precord <cprecord@editra.org>"
__svnid__ = "$Id: $"
__revision__ = "$Revision: $"
#-----------------------------------------------------------------------------#
# Imports
import os
import sys
import wx
# Put local package on the path
sys.path.insert(0, os.path.abspath('../../'))
#-----------------------------------------------------------------------------#
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, wx.ID_ANY, size=(500,500))
# Attributes
self.log = log
# Layout
self.__DoLayout()
def __DoLayout(self):
"""Layout the panel"""
pass
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
class TestLog:
def __init__(self):
pass
def write(self, msg):
print msg
#----------------------------------------------------------------------
overview = __doc__
#-----------------------------------------------------------------------------#
if __name__ == '__main__':
try:
import sys
import run
except ImportError:
app = wx.PySimpleApp(False)
frame = wx.Frame(None, title="")
sizer = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(TestPanel(frame, TestLog()), 1, wx.EXPAND)
frame.CreateStatusBar()
frame.SetSizer(sizer)
frame.SetInitialSize()
frame.Show()
app.MainLoop()
else:
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|