[Pythonmac-SIG] [q] Help with choosing "right" python port

Kent Quirk kquirk at solidworks.com
Wed Oct 26 16:57:40 CEST 2005


The thing to realize is that IDLE is a TK application...and so is the
turtle graphics. They conflict. There are apparently workarounds, but
I'm not a TK weenie. There's some information here:

 

http://rlai.cs.ualberta.ca/RLAI/RLsoftware/PythonLinks.html

 

Consider teaching kids to use a text editor instead of typing things
into IDLE. They can write and save programs and run them pretty easily.
SubEthaEdit is free for noncommercial use and could even let kids
collaborate on writing programs together from separate machines.

 

Try this program, for example:

 

import turtle 

import random

 

turtle.reset()

 

turtle.down()

for i in xrange(100):

    dist = random.randint(5, 15)

    angle = random.randint(-135, 135)

    turtle.forward(dist)

    turtle.right(angle)

turtle.up()

 

Save it into a .py file, then run python on it. 

 

Once you get a decent editor set up, it's a lot easier and more scalable
than monkeying with IDLE anyway.

 

You might also consider something like PyGame, depending on the
sophistication and interests of your students.

 

             Kent 

 

________________________________

From: pythonmac-sig-bounces at python.org
[mailto:pythonmac-sig-bounces at python.org] On Behalf Of Neal Carpenter
Sent: Sunday, October 23, 2005 4:22 PM
To: pythonmac-sig at python.org
Subject: [Pythonmac-SIG] [q] Help with choosing "right" python port

 

The problem: From within IDLE, I type:

from turtle import *
reset()

I then get a small window, titled tk, and a new 'console' window. When I
move the cursor to either of these I get a spinning rainbow disk, and am
unable to enlarge the tk window. This does not happen when I use
Terminal.

 

I want to use IDLE (for ease of use) and turtle graphics (for
motivation) to teach programming to my 6th, 7th, and 8th graders. Am I
doing something wrong? Is this a problem with IDLE? Is there a fix or a
work-around? (I'm very new to Python myself and have warned my students
that I'll be learning it from them, as they learn from me.)

 

Also, what is the 'Console' window for? I've tried typing in it only to
get error messages.

 

This started while I was using Jack Jensen's IDLE, and Tiger's built-in
Python (2.3.5?); I've spent most of the day searching for a solution and
came upon your name in Pythonmac-SIG. So I got to your site, downloaded
and ran 2.4.1 and the TigerPython24Fix, only to find that the exact same
thing still happens - import turtle stuff, invoke any turtle word, and
find a small window that 'works' (the turtle moves around, on command)
but that cannot be enlarged (still the swirling rainbow disk).

 

Thanks for your time - any help would be greatly appreciated.

 

-- 

Stay in Touch!

Neal Carpenter                                  Search for the Eternal.
ncarpenter at teachers.org                        Find it ... In the
Search.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20051026/dcc8c330/attachment-0001.htm


More information about the Pythonmac-SIG mailing list