[Edu-sig] graphics programming with Python

Kirby Urner pdx4d@teleport.com
Sat, 12 May 2001 13:23:22 -0700


You can use Daniel's graphics.py in shell mode if you enter
the lines sequentially.

>>> from graphics import *
>>> clearGraphics()
>>> drawLine(0, 0, 100, 0)
>>> drawLine(100, 0, 100, 100)
>>> drawLine(100, 100, 0, 100)
>>> drawLine(0, 100, 0, 0)

This seems tedius because you'd normally want to do more 
than draw a single line.

>>> import circle
>>> circle.testCircles(10,1)

is a more realistic example of interactive use.

Kirby


-----Original Message-----
From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On
Behalf Of Sheila King
Sent: Saturday, May 12, 2001 12:03 PM
To: Daniel Yoo; edu-sig@python.org
Subject: Re: [Edu-sig] graphics programming with Python


I take it back. I was trying to put the script into the interactive interpreter
in IDLE. That didn't work. When I put it into a saved script file, and ran it
from within IDLE, by opening the script in a separate window, then it appeared
to work just fine.