Difference between cTurtle and turtle

Reply

Join Date: Sep 2009
Posts: 9
Reputation: i are smart is an unknown quantity at this point 
Solved Threads: 0
i are smart i are smart is offline Offline
Newbie Poster

Difference between cTurtle and turtle

 
0
  #1
Sep 23rd, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 49
Reputation: Mathhax0r is an unknown quantity at this point 
Solved Threads: 11
Mathhax0r Mathhax0r is offline Offline
Light Poster

Re: Difference between cTurtle and turtle

 
0
  #2
Sep 24th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 101
Reputation: ov3rcl0ck is an unknown quantity at this point 
Solved Threads: 11
ov3rcl0ck ov3rcl0ck is offline Offline
Junior Poster

Re: Difference between cTurtle and turtle

 
0
  #3
Sep 27th, 2009
Originally Posted by i are smart View Post
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

  1. try:
  2. import cTurtle as turtle
  3. except ImportError:
  4. import turtle

this will import cTurtle as turtle if cTurtle is installed, if its not it just imports turtle.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,542
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 172
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: Difference between cTurtle and turtle

 
0
  #4
Sep 27th, 2009
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/post95...tml#post953952
Last edited by Ene Uran; Sep 27th, 2009 at 6:21 pm.
drink her pretty
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 101
Reputation: ov3rcl0ck is an unknown quantity at this point 
Solved Threads: 11
ov3rcl0ck ov3rcl0ck is offline Offline
Junior Poster

Re: Difference between cTurtle and turtle

 
0
  #5
Sep 28th, 2009
hmm, my bad. Most modules beginning with C are reimplementations in C, they do this for quite a few modules.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,542
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 172
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: Difference between cTurtle and turtle

 
0
  #6
Sep 28th, 2009
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.
drink her pretty
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC