[Pythonmac-SIG] drawing graphics with Mac version of Python

Steven D. Majewski sdm7g@virginia.edu
Fri, 11 Sep 1998 13:00:01 -0400 (EDT)


On Thu, 10 Sep 1998, Joe VanAndel wrote:

> I'd like to teach some middle school students Python,
> and I'd like them to do some simple line drawing
> on the screen (like what can be  done with LOGO, or BASIC).
> (Naturally, I don't want to warp their minds by teaching BASIC.)

Well -- if you goal was not to teach them Python as much as 
to teach them turtle graphics and programming, etc. then there
is a VERY nice, free LOGO for the Mac available from MIT MediaLab:

  http://starlogo.www.media.mit.edu/people/starlogo/

and other free logo's are available for PCs. 

> What graphics facilities can I use from the Mac version of
> Python?  I suppose I can use the Tkinter canvas, but is there 
> something faster and easier?

But for MacPython there's: 
  Tkinter canvas. 
  Quickdraw 
     Framework.py can handle events, menus, window management, etc.,
     but it doesn't (I believe) has a canvas like retained drawing
     surface -- but if performance isn't the goal, that wouldn't be
     hard to do in Python, and would, in fact, be a nice advanced student 
     project. ( Tk's canvas and XlispStat's (which I also use a lot)
     graphics framework both do a lot of stuff for low level lines 
     and points "under the cover" in C for effeciecy -- something 
     that I find severly limits the extensibility of both! ) 
  WxWindows -- (Haven't tried any graphics programming with this myself--
     just tested some demo's on an early Mac version.)
  AWT canvas with JPython. 


In Ch'ville's, most of the schools have Mac's but many of the students
have PC's at home -- if that is an issue, then you probably don't want
to use Mac QuickDraw. ( On the other hand, if I were doing something like
this, I don't think I'ld want to get stuck supporting the installation
of Python on a diverse collection of Win3.1 Win95, Win98 ... Il'd be 
sorely tempted just to give them all Linux CD's and tell them to go home
and reformat Mom and Dad's hard disk! :-) :-) :-) [Just Kidding ...  mostly!]


---|  Steven D. Majewski   (804-982-0831)  <sdm7g@Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---

"I'm not as big a fool as I used to be, I'm a smaller fool." - Jack Kerouac
Some of the Dharma  <http://members.aol.com/kerouacsis/SomeDharma.html>