Forum Archive

Turtle graphics?

turtle71

Thanks omz for making Pythonista. Really impressive app!

Hi all. I'm new here, but haven't seen this question asked, so I guess I'll be the first:

Is there any way to use the turtle (http://docs.python.org/2/library/turtle.html) module in pythonista?

If not, any suggestions on the next best thing? I noticed the canvas module, but it seems less for education and more for production. I'm after turtle more for its educational value for new programmers than anything else.

TIA.

omz

No, it wouldn't be possible to use the turtle module in Pythonista because it relies on Tkinter. The next best thing would probably be to write a turtle-like wrapper around the canvas module, which shouldn't be too hard, but would be quite a lot of work, given how many methods the Turtle class has...

omz

I've made a very basic turtle module that uses the canvas module for drawing:

https://gist.github.com/4413863

When you run it as a script, you get a nice snowflake. Have fun!

turtle71

Nice. Thanks omz.

Charliebird3

Thanks, I was looking for the same exact thing.

Applebaumian

Would it be possible to change the Turtle's shape??

vortexman

try www.logointerpreter.com.
Surf your logo code for freee.