turtle

Posted on
Thu Sep 11, 2014 7:19 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

turtle

can I use python turtle in indigo?

in idle it works, when I open a scripting shell window within indigo
import turtle
def draw_square():
window = turtle.Screen()

it complains that
'module' object has no attribute 'Screen'

How do I add the Screen method to indigo? Do I need to import another library?

thx

Karl

Posted on
Thu Sep 11, 2014 7:31 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: turtle

What are you trying to draw to? Indigo Server has no UI so there's no "window" to draw to.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Sep 11, 2014 7:54 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: turtle

know that,... essentially would like to create dynamically png files using a graphics package that runs under py 2.5

get the same error in a regular terminal / py session, has nothing to do with indigo I guess.

Posted on
Thu Sep 11, 2014 8:08 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: turtle


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Sep 11, 2014 8:13 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: turtle

I'm not sure if it is possible to get it working, but it definitely is failing because of python 2.5. If you try it from Terminal after launching "python2.5" then it fails in the same manner as from Indigo's scripting shell.

Image

Posted on
Thu Sep 11, 2014 8:17 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: turtle

I think the Turtle library assumes an interactive session, like IDLE. Using a straight drawing package would be better.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Sep 11, 2014 9:47 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: turtle

installed cairo (after many trials with home-brew.) now have to make py recognize it.

Posted on
Thu Sep 11, 2014 10:01 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: turtle

pycairo:
Dependencies
------------
cairo >= 1.8.8
Python >= 2.6

no luck with py 2.5

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest