help:problem using the RawPen class/turtle module.

Lee Harr missive at frontiernet.net
Sat Apr 6 17:57:35 EST 2002


On 6 Apr 2002 03:03:14 -0800, alex <ale_xp at yahoo.com> wrote:
> Hi all, I'm a Python beginner, and I'm trying to use
> the module "turtle" to do some turtle graphics.
> But I have a problem when I try to use the turtle
> class RawPen in order to use it with a Canvas. 
> In particular when I try to run the following code: ...
> 
> ...
> root = Tkinter.Tk()
> c       =   Tkinter.Canvas(root,heigh=200,width=300)
                                  ^^^^^
            just a transcription typo, right?

> c.pack()
> mypen   =   turtle.RawPen(c)
> ... 
> 

I tried this at the interactive python prompt:

import turtle
import Tk
root=Tkinter.Tk()
c=Tkinter.Canvas(root)
c.pack(expand=1)
mypen=turtle.RawPen(c)


and got no errors.

This was with python2.1 configured with Tkinter

So it may be a configuration (rather than a
usage or syntax) problem.





More information about the Python-list mailing list