[Python-checkins] r52354 - in python/trunk: Lib/lib-tk/turtle.py Misc/NEWS

brett.cannon python-checkins at python.org
Mon Oct 16 05:09:54 CEST 2006


Author: brett.cannon
Date: Mon Oct 16 05:09:52 2006
New Revision: 52354

Modified:
   python/trunk/Lib/lib-tk/turtle.py
   python/trunk/Misc/NEWS
Log:
Fix turtle so that you can launch the demo2 function on its own instead of only
when the module is launched as a script.


Modified: python/trunk/Lib/lib-tk/turtle.py
==============================================================================
--- python/trunk/Lib/lib-tk/turtle.py	(original)
+++ python/trunk/Lib/lib-tk/turtle.py	Mon Oct 16 05:09:52 2006
@@ -15,6 +15,7 @@
 """
 
 from math import * # Also for export
+from time import sleep
 import Tkinter
 
 speeds = ['fastest', 'fast', 'normal', 'slow', 'slowest']
@@ -949,7 +950,6 @@
 
 
 if __name__ == '__main__':
-    from time import sleep
     demo()
     sleep(3)
     demo2()

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Mon Oct 16 05:09:52 2006
@@ -81,6 +81,10 @@
 Library
 -------
 
+- Fix turtle so that time.sleep is imported for the entire library.  Allows
+  the demo2 function to be executed on its own instead of only when the
+  module is run as a script.
+
 - Bug #813342: Start the IDLE subprocess with -Qnew if the parent
   is started with that option.
 


More information about the Python-checkins mailing list