+if __name__ == '__main__':
+ app = wx.PySimpleApp()
+ frame = wx.Frame(None, -1, "Dummy wx frame for testing printout.py")
+ frame.Show(True)
+ ptbl = PrintTable(frame)
+ ptbl.SetHeader('This is the test HEADER')
+ # a single sequence will print out as a single column with no borders ...
+ ptbl.data = (
+ 'This is the first line of text.',
+ 'This is the second line\nand the third. The fourth will be the number "4.0".',
+ 04.00,
+ 'This is the fifth line, but by design it is too long to fit in the width of a standard'\
+ ' page, so it will be forced to wrap around in order to fit without having '\
+ 'some of its verbose verbage truncated.',
+ 'Here we have the final line.'
+ )
+ #... but, if labels or columns are defined, a single sequence will print out as a single row
+ ##ptbl.label = ('One','Two','Three','Four','5')
+ ptbl.Preview()
+ app.MainLoop()