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

Recommended Answers

All 5 Replies

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.

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.

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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.