title
= 'Pmw.TimeCounter demonstration'
# Import Pmw from this directory tree.
sys
.path
[:0] = ['../../..']
def __init__(self
, parent
):
self
._time
= Pmw
.TimeCounter(parent
,
self
._time
.pack(padx
=10, pady
=5)
button
= Tkinter
.Button(parent
, text
= 'Show', command
= self
.show
)
stringVal
= self
._time
.getstring()
intVal
= self
._time
.getint()
print stringVal
+ ' (' + str(intVal
) + ')'
######################################################################
# Create demo in root window for testing.
if __name__
== '__main__':
exitButton
= Tkinter
.Button(root
, text
= 'Exit', command
= root
.destroy
)
exitButton
.pack(side
= 'bottom')