Submit
Path:
~
/
/
usr
/
lib64
/
python2.7
/
Demo
/
turtle
/
File Content:
about_turtle.txt
======================================================== A new turtle module for Python ======================================================== Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966. Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an ``import turtle``, give it the command turtle.forward(15), and it moves (on-screen!) 15 pixels in the direction it is facing, drawing a line as it moves. Give it the command turtle.right(25), and it rotates in-place 25 degrees clockwise. By combining together these and similar commands, intricate shapes and pictures can easily be drawn. ----- turtle.py This module is an extended reimplementation of turtle.py from the Python standard distribution up to Python 2.5. (See: http:\\www.python.org) It tries to keep the merits of turtle.py and to be (nearly) 100% compatible with it. This means in the first place to enable the learning programmer to use all the commands, classes and methods interactively when using the module from within IDLE run with the -n switch. Roughly it has the following features added: - Better animation of the turtle movements, especially of turning the turtle. So the turtles can more easily be used as a visual feedback instrument by the (beginning) programmer. - Different turtle shapes, gif-images as turtle shapes, user defined and user controllable turtle shapes, among them compound (multicolored) shapes. Turtle shapes can be stgretched and tilted, which makes turtles zu very versatile geometrical objects. - Fine control over turtle movement and screen updates via delay(), and enhanced tracer() and speed() methods. - Aliases for the most commonly used commands, like fd for forward etc., following the early Logo traditions. This reduces the boring work of typing long sequences of commands, which often occur in a natural way when kids try to program fancy pictures on their first encounter with turtle graphcis. - Turtles now have an undo()-method with configurable undo-buffer. - Some simple commands/methods for creating event driven programs (mouse-, key-, timer-events). Especially useful for programming games. - A scrollable Canvas class. The default scrollable Canvas can be extended interactively as needed while playing around with the turtle(s). - A TurtleScreen class with methods controlling background color or background image, window and canvas size and other properties of the TurtleScreen. - There is a method, setworldcoordinates(), to install a user defined coordinate-system for the TurtleScreen. - The implementation uses a 2-vector class named Vec2D, derived from tuple. This class is public, so it can be imported by the application programmer, which makes certain types of computations very natural and compact. - Appearance of the TurtleScreen and the Turtles at startup/import can be configured by means of a turtle.cfg configuration file. The default configuration mimics the appearance of the old turtle module. - If configured appropriately the module reads in docstrings from a docstring dictionary in some different language, supplied separately and replaces the english ones by those read in. There is a utility function write_docstringdict() to write a dictionary with the original (english) docstrings to disc, so it can serve as a template for translations.
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
about_turtle.txt
3525 bytes
0644
about_turtledemo.txt
302 bytes
0644
demohelp.txt
2438 bytes
0644
tdemo_I_dontlike_tiltdemo.py
1073 bytes
0644
tdemo_I_dontlike_tiltdemo.pyc
1659 bytes
0644
tdemo_I_dontlike_tiltdemo.pyo
1659 bytes
0644
tdemo_bytedesign.py
4219 bytes
0644
tdemo_bytedesign.pyc
5313 bytes
0644
tdemo_bytedesign.pyo
5313 bytes
0644
tdemo_chaos.py
953 bytes
0644
tdemo_chaos.pyc
2297 bytes
0644
tdemo_chaos.pyo
2297 bytes
0644
tdemo_clock.py
3018 bytes
0644
tdemo_clock.pyc
4490 bytes
0644
tdemo_clock.pyo
4490 bytes
0644
tdemo_colormixer.py
1338 bytes
0644
tdemo_colormixer.pyc
2365 bytes
0644
tdemo_colormixer.pyo
2365 bytes
0644
tdemo_fractalcurves.py
3410 bytes
0644
tdemo_fractalcurves.pyc
3524 bytes
0644
tdemo_fractalcurves.pyo
3524 bytes
0644
tdemo_lindenmayer_indian.py
2433 bytes
0644
tdemo_lindenmayer_indian.pyc
3602 bytes
0644
tdemo_lindenmayer_indian.pyo
3602 bytes
0644
tdemo_minimal_hanoi.py
1961 bytes
0644
tdemo_minimal_hanoi.pyc
3589 bytes
0644
tdemo_minimal_hanoi.pyo
3589 bytes
0644
tdemo_nim.py
6588 bytes
0644
tdemo_nim.pyc
9383 bytes
0644
tdemo_nim.pyo
9383 bytes
0644
tdemo_paint.py
1126 bytes
0644
tdemo_paint.pyc
1737 bytes
0644
tdemo_paint.pyo
1737 bytes
0644
tdemo_peace.py
1117 bytes
0644
tdemo_peace.pyc
1443 bytes
0644
tdemo_peace.pyo
1443 bytes
0644
tdemo_penrose.py
3536 bytes
0644
tdemo_penrose.pyc
6005 bytes
0644
tdemo_penrose.pyo
6005 bytes
0644
tdemo_planet_and_moon.py
2840 bytes
0644
tdemo_planet_and_moon.pyc
4548 bytes
0644
tdemo_planet_and_moon.pyo
4548 bytes
0644
tdemo_tree.py
1411 bytes
0644
tdemo_tree.pyc
2123 bytes
0644
tdemo_tree.pyo
2123 bytes
0644
tdemo_wikipedia.py
1347 bytes
0644
tdemo_wikipedia.pyc
1955 bytes
0644
tdemo_wikipedia.pyo
1955 bytes
0644
tdemo_yinyang.py
808 bytes
0644
tdemo_yinyang.pyc
1320 bytes
0644
tdemo_yinyang.pyo
1320 bytes
0644
turtle.cfg
160 bytes
0644
turtleDemo.py
10183 bytes
0644
turtleDemo.pyc
10212 bytes
0644
turtleDemo.pyo
10212 bytes
0644
turtledemo_two_canvases.py
885 bytes
0644
turtledemo_two_canvases.pyc
1252 bytes
0644
turtledemo_two_canvases.pyo
1252 bytes
0644
N4ST4R_ID | Naxtarrr