Skip to content

Commit

Permalink
Fix turtle so that you can launch the demo2 function on its own inste…
Browse files Browse the repository at this point in the history
…ad of only

when the module is launched as a script.


git-svn-id: http://svn.python.org/projects/python/trunk@52354 6015fed2-1504-0410-9fe1-9d1591cc4771
  • Loading branch information
brett.cannon committed Oct 16, 2006
1 parent f30b843 commit ebcf0dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/lib-tk/turtle.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""

from math import * # Also for export
from time import sleep
import Tkinter

speeds = ['fastest', 'fast', 'normal', 'slow', 'slowest']
Expand Down Expand Up @@ -949,7 +950,6 @@ def demo2():


if __name__ == '__main__':
from time import sleep
demo()
sleep(3)
demo2()
Expand Down
4 changes: 4 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Core and builtins
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.

Expand Down

0 comments on commit ebcf0dc

Please sign in to comment.