0

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

turtle.setup(width=800,height=600,startx=400,starty=300)
turtle.down()
turtle.right(30)
turtle.forward(100)
3
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by Fuse
0

It worked for me. What result are you getting?

Jeff

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

0

cwc@tma ~/ppython $ python setup.py
Traceback (most recent call last):
File "setup.py", line 3, in ?
turtle.setup(width=800,height=600,startx=400,starty=300)
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.

0

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.

Sorry.

Jeff

0

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

cdub

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.