[Tutor] serious problem with graphics module

roberto roberto03 at gmail.com
Tue Jun 2 17:29:41 CEST 2009


On Tue, May 26, 2009 at 12:28 AM, Gregor Lingl <gregor.lingl at aon.at> wrote:
>
>
> roberto schrieb:
> Do you use Python from the command line (terminal) or do you use IDLE?
> I ask this, because these two show different behaviour.
i use IDLE, in Python 3.0

>>
>> i have a problem with python 3.0 graphics module:
>>
>> no problem while importing the module
>>
>>>>>
>>>>> import turtle
>>>>>
>>
>> but when i issue any command like:
>>
>>>>>
>>>>> t = turtle.pen()
>>>>>
>
> After performing this command you should be able to observe
> a blank window with a tiny black arrow - it's the turtle
yes, i can see it but each time i try to get into that window, the
mouse pointer switch to the hourglass look and i cannot do anything
over the windwow;
moreover, if i try to click or move it, WS Xp tells me the program
pythonw.exe is not responding
>
> pen() is a function in the module turtle. It returns a dictionary
> of the attributes of the turtle's pen. Have a look at it:
>
>>>> print(t)
> {'pensize': 1, 'resizemode': 'noresize', 'pendown': True, 'fillcolor':
> 'black',
> 'speed': 3, 'shown': True, 'outline': 1, 'tilt': 0.0, 'pencolor': 'black',
> 'stretchfactor': (1.0, 1.0), 'shearfactor': 0.0}
>>>>
yes, i get a very similar answer

>
>>>>> t = turtle.forward(60)
>>>>>
>>
>> nothing appears on the screen, only a blank window, with nothing inside;
>> may you give me some hint ?
>>
>
>
> What happens if you do this?
>
>>>> from turtle import *
>>>> for i in range(4):
>       forward(100)
>       left(90)
>
as i wrote before, i can see the arrow inside the graphic window but i
cannot do anything inside it, i mean i cannot move or resize the
window etc.

anyway, yes i can see the arrow moving and drawing the square correctly

ps: i'll answer to your other mails also, thank you very much Gregor
-- 
roberto


More information about the Tutor mailing list