[Python-checkins] python/dist/src/Lib/lib-tk SimpleDialog.py, 1.4,
1.5
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Mon Mar 22 16:49:49 EST 2004
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4766
Modified Files:
SimpleDialog.py
Log Message:
Patch #911176: Move test function into __main__
Index: SimpleDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/SimpleDialog.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SimpleDialog.py 20 Mar 1998 20:45:43 -0000 1.4
--- SimpleDialog.py 22 Mar 2004 21:49:47 -0000 1.5
***************
*** 87,94 ****
! def test():
! root = Tk()
! def doit(root=root):
! d = SimpleDialog(root,
text="This is a test dialog. "
"Would this have been an actual dialog, "
--- 87,96 ----
! if __name__ == '__main__':
!
! def test():
! root = Tk()
! def doit(root=root):
! d = SimpleDialog(root,
text="This is a test dialog. "
"Would this have been an actual dialog, "
***************
*** 100,111 ****
cancel=2,
title="Test Dialog")
! print d.go()
! t = Button(root, text='Test', command=doit)
! t.pack()
! q = Button(root, text='Quit', command=t.quit)
! q.pack()
! t.mainloop()
!
- if __name__ == '__main__':
test()
--- 102,111 ----
cancel=2,
title="Test Dialog")
! print d.go()
! t = Button(root, text='Test', command=doit)
! t.pack()
! q = Button(root, text='Quit', command=t.quit)
! q.pack()
! t.mainloop()
test()
More information about the Python-checkins
mailing list