1 from wxPython
.wx
import *
2 from wxPython
.lib
.maskededit
import Field
, wxMaskedTextCtrl
, wxMaskedComboBox
, wxIpAddrCtrl
, states
, months
3 from wxPython
.lib
.maskededit
import __doc__
as overviewdoc
4 from wxPython
.lib
.maskededit
import autoformats
5 from wxPython
.lib
.scrolledpanel
import wxScrolledPanel
6 import string
, sys
, traceback
10 Centralized routines common to demo pages, to remove repetition.
12 def labelGeneralTable(self
, sizer
):
13 description
= wxStaticText( self
, -1, "Description", )
14 mask
= wxStaticText( self
, -1, "Mask Value" )
15 formatcode
= wxStaticText( self
, -1, "Format" )
16 regex
= wxStaticText( self
, -1, "Regexp Validator(opt.)" )
17 ctrl
= wxStaticText( self
, -1, "wxMaskedEdit Ctrl" )
19 description
.SetFont( wxFont(9, wxSWISS
, wxNORMAL
, wxBOLD
))
20 mask
.SetFont( wxFont(9, wxSWISS
, wxNORMAL
, wxBOLD
))
21 formatcode
.SetFont( wxFont(9, wxSWISS
, wxNORMAL
, wxBOLD
) )
22 regex
.SetFont( wxFont(9, wxSWISS
, wxNORMAL
, wxBOLD
))
23 ctrl
.SetFont( wxFont(9, wxSWISS
, wxNORMAL
, wxBOLD
))
25 sizer
.Add(description
)
32 def layoutGeneralTable(self
, controls
, sizer
):
33 for control
in controls
:
34 sizer
.Add( wxStaticText( self
, -1, control
[0]) )
35 sizer
.Add( wxStaticText( self
, -1, control
[1]) )
36 sizer
.Add( wxStaticText( self
, -1, control
[3]) )
37 sizer
.Add( wxStaticText( self
, -1, control
[4]) )
39 if control
in controls
:
40 newControl
= wxMaskedTextCtrl( self
, -1, "",
42 excludeChars
= control
[2],
43 formatcodes
= control
[3],
45 validRegex
= control
[4],
46 validRange
= control
[5],
48 choiceRequired
= True,
49 defaultValue
= control
[7],
52 self
.editList
.append(newControl
)
56 def changeControlParams(self
, event
, parameter
, checked_value
, notchecked_value
):
57 if event
.Checked(): value
= checked_value
58 else: value
= notchecked_value
59 kwargs
= {parameter: value}
60 for control
in self
.editList
:
61 control
.SetCtrlParameters(**kwargs
)
67 #----------------------------------------------------------------------------
68 class demoPage1(wxScrolledPanel
, demoMixin
):
69 def __init__(self
, parent
, log
):
70 wxScrolledPanel
.__init
__(self
, parent
, -1)
71 self
.sizer
= wxBoxSizer( wxVERTICAL
)
74 label
= wxStaticText( self
, -1, """\
75 Here are some basic wxMaskedTextCtrls to give you an idea of what you can do
76 with this control. Note that all controls have been auto-sized by including 'F' in
79 Try entering nonsensical or partial values in validated fields to see what happens.
80 Note that the State and Last Name fields are list-limited (valid last names are:
81 Smith, Jones, Williams). Signs on numbers can be toggled with the minus key.
83 label
.SetForegroundColour( "Blue" )
84 header
= wxBoxSizer( wxHORIZONTAL
)
85 header
.Add( label
, 0, flag
=wxALIGN_LEFT|wxALL
, border
= 5 )
87 highlight
= wxCheckBox( self
, -1, "Highlight Empty" )
88 disallow
= wxCheckBox( self
, -1, "Disallow Empty" )
89 showFill
= wxCheckBox( self
, -1, "change fillChar" )
91 vbox
= wxBoxSizer( wxVERTICAL
)
92 vbox
.Add( highlight
, 0, wxALIGN_LEFT|wxALL
, 5 )
93 vbox
.Add( disallow
, 0, wxALIGN_LEFT|wxALL
, 5 )
94 vbox
.Add( showFill
, 0, wxALIGN_LEFT|wxALL
, 5 )
95 header
.AddSpacer(15, 0)
96 header
.Add(vbox
, 0, flag
=wxALIGN_LEFT|wxALL
, border
=5 )
98 EVT_CHECKBOX( self
, highlight
.GetId(), self
.onHighlightEmpty
)
99 EVT_CHECKBOX( self
, disallow
.GetId(), self
.onDisallowEmpty
)
100 EVT_CHECKBOX( self
, showFill
.GetId(), self
.onShowFill
)
102 grid
= wxFlexGridSizer( 0, 5, vgap
=10, hgap
=10 )
103 self
.labelGeneralTable(grid
)
105 # The following list is of the controls for the demo. Feel free to play around with
108 #description mask excl format regexp range,list,initial
109 ("Phone No", "(###) ###-#### x:###", "", 'F^-', "^\(\d{3}\) \d{3}-\d{4}", '','',''),
110 ("Social Sec#", "###-##-####", "", 'F', "\d{3}-\d{2}-\d{4}", '','',''),
111 ("Full Name", "C{14}", "", 'F_', '^[A-Z][a-zA-Z]+ [A-Z][a-zA-Z]+', '','',''),
112 ("Last Name Only", "C{14}", "", 'F {list}', '^[A-Z][a-zA-Z]+', '',('Smith','Jones','Williams'),''),
113 ("Zip plus 4", "#{5}-#{4}", "", 'F', "\d{5}-(\s{4}|\d{4})", '','',''),
114 ("Customer No", "\CAA-###", "", 'F!', "C[A-Z]{2}-\d{3}", '','',''),
115 ("Invoice Total", "#{9}.##", "", 'F-_,', "", '','',''),
116 ("Integer", "#{9}", "", 'F-_', "", '','',''),
119 self
.layoutGeneralTable(controls
, grid
)
120 self
.sizer
.Add( header
, 0, flag
=wxALIGN_LEFT|wxALL
, border
=5 )
121 self
.sizer
.Add( grid
, 0, flag
= wxALIGN_LEFT|wxLEFT
, border
=5 )
122 self
.SetSizer(self
.sizer
)
123 self
.SetupScrolling()
124 self
.SetAutoLayout(1)
127 def onDisallowEmpty( self
, event
):
128 """ Set emptyInvalid parameter on/off """
129 self
.changeControlParams( event
, "emptyInvalid", True, False )
131 def onHighlightEmpty( self
, event
):
132 """ Highlight empty values"""
133 self
.changeControlParams( event
, "emptyBackgroundColor", "Blue", "White" )
135 def onShowFill( self
, event
):
136 """ Set fillChar parameter to '?' or ' ' """
137 self
.changeControlParams( event
, "fillChar", '?', ' ' )
140 class demoPage2(wxScrolledPanel
, demoMixin
):
141 def __init__( self
, parent
, log
):
143 wxScrolledPanel
.__init
__( self
, parent
, -1 )
144 self
.sizer
= wxBoxSizer( wxVERTICAL
)
146 label
= wxStaticText( self
, -1, """\
147 All these controls have been created by passing a single parameter, the autoformat code.
148 The class contains an internal dictionary of types and formats (autoformats).
149 Many of these already do complicated validation; To see some examples, try
150 29 Feb 2002 vs. 2004 for the date formats, or email address validation.
153 label
.SetForegroundColour( "Blue" )
154 self
.sizer
.Add( label
, 0, wxALIGN_LEFT|wxALL
, 5 )
156 description
= wxStaticText( self
, -1, "Description")
157 autofmt
= wxStaticText( self
, -1, "AutoFormat Code")
158 ctrl
= wxStaticText( self
, -1, "wxMaskedEdit Control")
160 description
.SetFont( wxFont( 9, wxSWISS
, wxNORMAL
, wxBOLD
) )
161 autofmt
.SetFont( wxFont( 9, wxSWISS
, wxNORMAL
, wxBOLD
) )
162 ctrl
.SetFont( wxFont( 9, wxSWISS
, wxNORMAL
, wxBOLD
) )
164 grid
= wxFlexGridSizer( 0, 3, vgap
=10, hgap
=5 )
165 grid
.Add( description
, 0, wxALIGN_LEFT
)
166 grid
.Add( autofmt
, 0, wxALIGN_LEFT
)
167 grid
.Add( ctrl
, 0, wxALIGN_LEFT
)
169 for autoformat
, desc
in autoformats
:
170 grid
.Add( wxStaticText( self
, -1, desc
), 0, wxALIGN_LEFT
)
171 grid
.Add( wxStaticText( self
, -1, autoformat
), 0, wxALIGN_LEFT
)
172 grid
.Add( wxMaskedTextCtrl( self
, -1, "",
173 autoformat
= autoformat
,
178 self
.sizer
.Add( grid
, 0, wxALIGN_LEFT|wxALL
, border
=5 )
179 self
.SetSizer( self
.sizer
)
180 self
.SetAutoLayout( 1 )
181 self
.SetupScrolling()
184 class demoPage3(wxScrolledPanel
, demoMixin
):
185 def __init__(self
, parent
, log
):
187 wxScrolledPanel
.__init
__(self
, parent
, -1)
188 self
.sizer
= wxBoxSizer( wxVERTICAL
)
191 label
= wxStaticText( self
, -1, """\
192 Here wxMaskedTextCtrls that have default values. The states
193 control has a list of valid values, and the unsigned integer
194 has a legal range specified.
196 label
.SetForegroundColour( "Blue" )
197 requireValid
= wxCheckBox( self
, -1, "Require Valid Value" )
198 EVT_CHECKBOX( self
, requireValid
.GetId(), self
.onRequireValid
)
200 header
= wxBoxSizer( wxHORIZONTAL
)
201 header
.Add( label
, 0, flag
=wxALIGN_LEFT|wxALL
, border
= 5)
202 header
.AddSpacer(75, 0)
203 header
.Add( requireValid
, 0, flag
=wxALIGN_LEFT|wxALL
, border
=10 )
205 grid
= wxFlexGridSizer( 0, 5, vgap
=10, hgap
=10 )
206 self
.labelGeneralTable( grid
)
209 #description mask excl format regexp range,list,initial
210 ("U.S. State (2 char)", "AA", "", 'F!_', "[A-Z]{2}", '',states
, states
[0]),
211 ("Integer (signed)", "#{6}", "", 'F-_R', "", '','', '0 '),
212 ("Integer (unsigned)\n(1-399)","######", "", 'F_', "", (1,399),'', '1 '),
213 ("Float (signed)", "#{6}.#{9}", "", 'F-_R', "", '','', '000000.000000000'),
214 ("Date (MDY) + Time", "##/##/#### ##:##:## AM", 'BCDEFGHIJKLMNOQRSTUVWXYZ','DF!',"", '','', wxDateTime_Now().Format("%m/%d/%Y %I:%M:%S %p")),
216 self
.layoutGeneralTable( controls
, grid
)
218 self
.sizer
.Add( header
, 0, flag
=wxALIGN_LEFT|wxALL
, border
=5 )
219 self
.sizer
.Add( grid
, 0, flag
=wxALIGN_LEFT|wxALL
, border
=5 )
221 self
.SetSizer( self
.sizer
)
222 self
.SetAutoLayout( 1 )
223 self
.SetupScrolling()
225 def onRequireValid( self
, event
):
226 """ Set validRequired parameter on/off """
227 self
.changeControlParams( event
, "validRequired", True, False )
230 class demoPage4(wxScrolledPanel
, demoMixin
):
231 def __init__( self
, parent
, log
):
233 wxScrolledPanel
.__init
__( self
, parent
, -1 )
234 self
.sizer
= wxBoxSizer( wxVERTICAL
)
236 label
= wxStaticText( self
, -1, """\
237 These controls have field-specific choice lists and allow autocompletion.
239 Down arrow or Page Down in an uncompleted field with an auto-completable field will attempt
240 to auto-complete a field if it has a choice list.
241 Page Down and Shift-Down arrow will also auto-complete, or cycle through the complete list.
242 Page Up and Shift-Up arrow will similarly cycle backwards through the list.
245 label
.SetForegroundColour( "Blue" )
246 self
.sizer
.Add( label
, 0, wxALIGN_LEFT|wxALL
, 5 )
248 description
= wxStaticText( self
, -1, "Description" )
249 autofmt
= wxStaticText( self
, -1, "AutoFormat Code" )
250 fields
= wxStaticText( self
, -1, "Field Objects" )
251 ctrl
= wxStaticText( self
, -1, "wxMaskedEdit Control" )
253 description
.SetFont( wxFont( 9, wxSWISS
, wxNORMAL
, wxBOLD
) )
254 autofmt
.SetFont( wxFont( 9, wxSWISS
, wxNORMAL
, wxBOLD
) )
255 fields
.SetFont( wxFont( 9, wxSWISS
, wxNORMAL
, wxBOLD
) )
256 ctrl
.SetFont( wxFont( 9, wxSWISS
, wxNORMAL
, wxBOLD
) )
258 grid
= wxFlexGridSizer( 0, 4, vgap
=10, hgap
=10 )
259 grid
.Add( description
, 0, wxALIGN_LEFT
)
260 grid
.Add( autofmt
, 0, wxALIGN_LEFT
)
261 grid
.Add( fields
, 0, wxALIGN_LEFT
)
262 grid
.Add( ctrl
, 0, wxALIGN_LEFT
)
264 autoformat
= "USPHONEFULLEXT"
265 fieldsDict
= {0: Field(choices=["617","781","508","978","413"], choiceRequired=True)}
270 choiceRequired=True)}"""
271 grid
.Add( wxStaticText( self
, -1, "Restricted Area Code"), 0, wxALIGN_LEFT
)
272 grid
.Add( wxStaticText( self
, -1, autoformat
), 0, wxALIGN_LEFT
)
273 grid
.Add( wxStaticText( self
, -1, fieldsLabel
), 0, wxALIGN_LEFT
)
274 grid
.Add( wxMaskedTextCtrl( self
, -1, "",
275 autoformat
= autoformat
,
281 autoformat
= "EXPDATEMMYY"
282 fieldsDict
= {1: Field(choices=["03", "04", "05"], choiceRequired=True)}
286 choiceRequired=True)}"""
287 exp
= wxMaskedTextCtrl( self
, -1, "",
288 autoformat
= autoformat
,
293 grid
.Add( wxStaticText( self
, -1, "Restricted Expiration"), 0, wxALIGN_LEFT
)
294 grid
.Add( wxStaticText( self
, -1, autoformat
), 0, wxALIGN_LEFT
)
295 grid
.Add( wxStaticText( self
, -1, fieldsLabel
), 0, wxALIGN_LEFT
)
296 grid
.Add( exp
, 0, wxALIGN_LEFT
)
298 fieldsDict
= {0: Field(choices
=["02134","02155"], choiceRequired
=True),
299 1: Field(choices
=["1234", "5678"], choiceRequired
=False)}
301 {0: Field(choices=["02134","02155"],
302 choiceRequired=True),
303 1: Field(choices=["1234", "5678"],
304 choiceRequired=False)}"""
305 autoformat
= "USZIPPLUS4"
306 zip = wxMaskedTextCtrl( self
, -1, "",
307 autoformat
= autoformat
,
312 grid
.Add( wxStaticText( self
, -1, "Restricted Zip + 4"), 0, wxALIGN_LEFT
)
313 grid
.Add( wxStaticText( self
, -1, autoformat
), 0, wxALIGN_LEFT
)
314 grid
.Add( wxStaticText( self
, -1, fieldsLabel
), 0, wxALIGN_LEFT
)
315 grid
.Add( zip, 0, wxALIGN_LEFT
)
317 self
.sizer
.Add( grid
, 0, wxALIGN_LEFT|wxALL
, border
=5 )
318 self
.SetSizer( self
.sizer
)
319 self
.SetAutoLayout(1)
320 self
.SetupScrolling()
323 class demoPage5(wxScrolledPanel
, demoMixin
):
324 def __init__( self
, parent
, log
):
326 wxScrolledPanel
.__init
__( self
, parent
, -1 )
327 self
.sizer
= wxBoxSizer( wxVERTICAL
)
328 label
= wxStaticText( self
, -1, """\
329 These are examples of wxMaskedComboBox and wxIpAddrCtrl, and more useful
330 configurations of a wxMaskedTextCtrl for integer and floating point input.
332 label
.SetForegroundColour( "Blue" )
333 self
.sizer
.Add( label
, 0, wxALIGN_LEFT|wxALL
, 5 )
335 numerators
= [ str(i
) for i
in range(1, 4) ]
336 denominators
= [ string
.ljust(str(i
), 2) for i
in [2,3,4,5,8,16,32,64] ]
337 fieldsDict
= {0: Field(choices
=numerators
, choiceRequired
=False),
338 1: Field(choices
=denominators
, choiceRequired
=True)}
341 for d
in denominators
:
343 choices
.append( '%s/%s' % (n
,d
) )
346 text1
= wxStaticText( self
, -1, """\
347 A masked ComboBox for fraction selection.
348 Choices for each side of the fraction can be
349 selected with PageUp/Down:""")
351 fraction
= wxMaskedComboBox( self
, -1, "",
353 choiceRequired
= True,
356 validRegex
= "^\d\/\d\d?",
357 fields
= fieldsDict
)
360 text2
= wxStaticText( self
, -1, """
361 A masked ComboBox to validate
362 text from a list of numeric codes:""")
364 choices
= ["91", "136", "305", "4579"]
365 code
= wxMaskedComboBox( self
, -1, choices
[0],
367 choiceRequired
= True,
372 text3
= wxStaticText( self
, -1, """\
373 A masked state selector; only "legal" values
376 state
= wxMaskedComboBox( self
, -1, states
[0],
378 autoformat
="USSTATE")
380 text4
= wxStaticText( self
, -1, "An empty IP Address entry control:")
381 ip_addr1
= wxIpAddrCtrl( self
, -1, style
= wxTE_PROCESS_TAB
)
384 text5
= wxStaticText( self
, -1, "An IP Address control with a restricted mask:")
385 ip_addr2
= wxIpAddrCtrl( self
, -1, mask
=" 10. 1.109.###" )
388 text6
= wxStaticText( self
, -1, """\
389 An IP Address control with restricted choices
390 of form: 10. (1|2) . (129..255) . (0..255)""")
391 ip_addr3
= wxIpAddrCtrl( self
, -1, mask
=" 10. #.###.###")
392 ip_addr3
.SetFieldParameters(0, validRegex
="1|2" ) # requires entry to match or not allowed
395 # This allows any value in penultimate field, but colors anything outside of the range invalid:
396 ip_addr3
.SetFieldParameters(1, validRange
=(129,255), validRequired
=False )
398 text7
= wxStaticText( self
, -1, """\
399 A right-insert integer entry control:""")
400 intctrl
= wxMaskedTextCtrl(self
, -1, name
='intctrl', mask
="#{9}", formatcodes
= '_-r,F')
402 text8
= wxStaticText( self
, -1, """\
403 A floating point entry control
404 with right-insert for ordinal:""")
405 self
.floatctrl
= wxMaskedTextCtrl(self
, -1, name
='floatctrl', mask
="#{9}.#{2}", formatcodes
="F,_-R")
406 self
.floatctrl
.SetFieldParameters(0, formatcodes
='r<', validRequired
=True) # right-insert, require explicit cursor movement to change fields
407 self
.floatctrl
.SetFieldParameters(1, defaultValue
='00') # don't allow blank fraction
409 text9
= wxStaticText( self
, -1, """\
410 Use this control to programmatically set
411 the value of the above float control:""")
412 number_combo
= wxComboBox(self
, -1, choices
= [ '', '111', '222.22', '-3', '54321.666666666', '-1353.978',
413 '1234567', '-1234567', '123456789', '-123456789.1',
414 '1234567890.', '-1234567890.1' ])
416 grid
= wxFlexGridSizer( 0, 2, vgap
=10, hgap
= 5 )
417 grid
.Add( text1
, 0, wxALIGN_LEFT
)
418 grid
.Add( fraction
, 0, wxALIGN_LEFT
)
419 grid
.Add( text2
, 0, wxALIGN_LEFT
)
420 grid
.Add( code
, 0, wxALIGN_LEFT
)
421 grid
.Add( text3
, 0, wxALIGN_LEFT
)
422 grid
.Add( state
, 0, wxALIGN_LEFT
)
423 grid
.Add( text4
, 0, wxALIGN_LEFT
)
424 grid
.Add( ip_addr1
, 0, wxALIGN_LEFT
)
425 grid
.Add( text5
, 0, wxALIGN_LEFT
)
426 grid
.Add( ip_addr2
, 0, wxALIGN_LEFT
)
427 grid
.Add( text6
, 0, wxALIGN_LEFT
)
428 grid
.Add( ip_addr3
, 0, wxALIGN_LEFT
)
429 grid
.Add( text7
, 0, wxALIGN_LEFT
)
430 grid
.Add( intctrl
, 0, wxALIGN_LEFT
)
431 grid
.Add( text8
, 0, wxALIGN_LEFT
)
432 grid
.Add( self
.floatctrl
, 0, wxALIGN_LEFT
)
433 grid
.Add( text9
, 0, wxALIGN_LEFT
)
434 grid
.Add( number_combo
, 0, wxALIGN_LEFT
)
436 self
.sizer
.Add( grid
, 0, wxALIGN_LEFT|wxALL
, border
=5 )
437 self
.SetSizer( self
.sizer
)
438 self
.SetAutoLayout(1)
439 self
.SetupScrolling()
441 EVT_COMBOBOX( self
, fraction
.GetId(), self
.OnComboChange
)
442 EVT_COMBOBOX( self
, code
.GetId(), self
.OnComboChange
)
443 EVT_COMBOBOX( self
, state
.GetId(), self
.OnComboChange
)
444 EVT_TEXT( self
, fraction
.GetId(), self
.OnComboChange
)
445 EVT_TEXT( self
, code
.GetId(), self
.OnComboChange
)
446 EVT_TEXT( self
, state
.GetId(), self
.OnComboChange
)
448 EVT_TEXT( self
, ip_addr1
.GetId(), self
.OnIpAddrChange
)
449 EVT_TEXT( self
, ip_addr2
.GetId(), self
.OnIpAddrChange
)
450 EVT_TEXT( self
, ip_addr3
.GetId(), self
.OnIpAddrChange
)
451 EVT_TEXT( self
, intctrl
.GetId(), self
.OnTextChange
)
452 EVT_TEXT( self
, self
.floatctrl
.GetId(), self
.OnTextChange
)
453 EVT_COMBOBOX( self
, number_combo
.GetId(), self
.OnNumberSelect
)
456 def OnComboChange( self
, event
):
457 ctl
= self
.FindWindowById( event
.GetId() )
458 if not ctl
.IsValid():
459 self
.log
.write('current value not a valid choice')
461 def OnIpAddrChange( self
, event
):
462 ip_addr
= self
.FindWindowById( event
.GetId() )
463 if ip_addr
.IsValid():
464 self
.log
.write('new addr = %s\n' % ip_addr
.GetAddress() )
466 def OnTextChange( self
, event
):
467 ctl
= self
.FindWindowById( event
.GetId() )
469 self
.log
.write('new value = %s\n' % ctl
.GetValue() )
471 def OnNumberSelect( self
, event
):
472 value
= event
.GetString()
474 # Format choice to fit into format for #{9}.#{2}, with sign position reserved:
475 # (ordinal + fraction == 11 + decimal point + sign == 13)
477 # Note: since self.floatctrl a right-aligned control, you could also just use
478 # "%.2f", but this wouldn't work properly for a left-aligned control.
479 # (See .SetValue() documentation in Overview.)
482 floattext
= "%13.2f" % float(value
)
484 floattext
= value
# clear the value again
486 self
.floatctrl
.SetValue(floattext
)
488 type, value
, tb
= sys
.exc_info()
489 for line
in traceback
.format_exception_only(type, value
):
492 # ---------------------------------------------------------------------
493 class TestMaskedTextCtrls(wxNotebook
):
494 def __init__(self
, parent
, id, log
):
495 wxNotebook
.__init
__(self
, parent
, id)
498 win
= demoPage1(self
, log
)
499 self
.AddPage(win
, "General examples")
501 win
= demoPage2(self
, log
)
502 self
.AddPage(win
, 'Auto-formatted controls')
504 win
= demoPage3(self
, log
)
505 self
.AddPage(win
, "Using default values")
507 win
= demoPage4(self
, log
)
508 self
.AddPage(win
, 'Using auto-complete fields')
510 win
= demoPage5(self
, log
)
511 self
.AddPage(win
, 'Other masked controls')
514 #----------------------------------------------------------------------------
516 def runTest(frame
, nb
, log
):
517 testWin
= TestMaskedTextCtrls(nb
, -1, log
)
521 app
= wxPySimpleApp()
522 frame
= wxFrame(None, -1, "Test wxMaskedTextCtrl", size
=(640, 480))
523 win
= TestMaskedTextCtrls(frame
, -1, sys
.stdout
)
526 #----------------------------------------------------------------------------
527 if __name__
== "__main__":
533 """ + overviewdoc
+ """
537 if __name__
== "__main__":
540 run
.main(['', os
.path
.basename(sys
.argv
[0])])