I'm running 2.4.4 using gentoo. I've compiled python with Tk. (USE="tk" in /etc/make.cont)

I can not get "turtle.setup(width=800,height=600,startx=400,starty=300)"
to set the screen size.

Any ideas? Is there another way to set the screen size?

? cdub

import Tkinter
import turtle


It worked for me. What result are you getting?


P.S. eliminate the spaces between "code = Python" to get your tag to work.

cwc@tma ~/ppython $ python setup.py
Traceback (most recent call last):
File "setup.py", line 3, in ?
AttributeError: 'module' object has no attribute 'setup'
cwc@tma ~/ppython $

thanks for the line. I am running python 2.4.4 .

I'm using Gentoo and had to compile python twice with a tk flag set to get turtle to work.
Gentoo is difficult to configure but I like it. It's fast on my p3 700 512meg ram laptop.

It looks like your turtle module is not correctly installed. The error message means that there is no 'turtle.setup', which clearly should not be the case.

I recommend either (a) reinstalling Python, or (b) looking at the source code and trying to fix the error manually.



Hey thanks! I'll give that a try after I research what compile flags to set.
Thanks for the line.


I update python to Python 2.5.2 (r252:60911, May 28 2008, 05:45:41
and all of my tk code works great.

Updating to Python 2.5.2 (r252:60911, May 28 2008, 05:45:41 was not easy wtih
Gentoo though. Things were a lot easier with fc7 and tc9.