[IPython-User] turtle lib

Pietro Terna pietro.terna@unito...
Thu Aug 16 01:43:42 CDT 2012


     Hi Thomas,

     many many thanks.

     Best wishes, Pietro


Il 16/08/12 08:37, Pietro Terna ha scritto:
> Hi Pietro,
>
> On 15 August 2012 22:29, Pietro Terna <pietro.terna@unito.it> wrote:
> >      using 'ipython notebook', is it possible to display the standard
> > graphic output of the turtle lib directly inline? (As when we see
> > matplotlib graphics inline).
>
> It's not currently integrated, but I think with a bit of hacking you
> could make it work:
>
> Turtle uses tkinter behind the scenes, drawing on a Canvas widget,
> which can save to postscript format (see
> http://stackoverflow.com/a/6049340/434217). Then you can use a library
> like PIL to convert that to png, which you can send to the frontend to
> display.
>
> Best wishes,
> Thomas
>

-- 
The world is full of interesting problems to be solved!
Home page http://web.econ.unito.it/terna or http://goo.gl/y0zbx



More information about the IPython-User mailing list