0

please tell me that there is a difference because i've spent an entire week figuring out how to make cTurtle work. Now that I have succeeded, both modules appears to have the same functions.

Please tell me that there is a difference

4
Contributors
5
Replies
7
Views
8 Years
Discussion Span
Last Post by Ene Uran
0

I've never used turtle before, but that looks similar to Pickle and cPickle. The difference between those two is that since python is kinda slow, they redid the Pickle library with C (cPython) to make it alot faster.

0

please tell me that there is a difference because i've spent an entire week figuring out how to make cTurtle work. Now that I have succeeded, both modules appears to have the same functions.

Please tell me that there is a difference

Thing is THEY DO BOTH DO THE SAME, cTurtle is a reimplementation of turtle but its done in C instead of python thus making it faster, I recommend trying this

try:
   import cTurtle as turtle
except ImportError:
   import turtle

this will import cTurtle as turtle if cTurtle is installed, if its not it just imports turtle.

0

cTurtle.py has nothing to do with C. It is simply someones hack of the turtle.py with a few extra methods added. See the beginning of file cTurtle.py for details. You can also run it, as it has a built-in demo.

It comes in two versions, one for Python2 and another for Python3.

In similar fashion, there is also the module frog, here you can use a picture of a frog or anything you like, and it has even sound effects. Great for entertaining kids of any age! See:
http://www.daniweb.com/forums/post953952.html#post953952

Edited by Ene Uran: n/a

0

hmm, my bad. Most modules beginning with C are reimplementations in C, they do this for quite a few modules.

0

Those modules are often written by instructors in colleges to keep their students from simply copying existing code, spreading confusion for the rest of us! There is a similar module out called graphics.py, that is a wrapper for Tkinter. Again nothing but a pain in the butt.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.