[Edu-sig] mac python graphics

John Zelle john.zelle at wartburg.edu
Wed Dec 7 23:00:42 CET 2011


Andrew,

The only real disadvantage of the non-threaded (current) version is that it does not play as well with the IDLE shell when demonstrating graphics interactively. But there are numerous advantages of the non-threaded version including that it works on OSX :-). I also like that I can have my students use Tkinter dialogs for opening files or getting simple inputs in graphics programs.

As far as documenting the complete GraphWin API, I've always been a bit lazy about moving things into the official API, just because I want to keep the API really small so that it doesn't overwhelm first-time users of graphics. There have always been a few undocumented "goodies" lurking in the module. When I decide that I _have_ to have them for certain class projects, then they make their way into the official API. I'm very conservative, because I don't want to remove things (for backward compatibility), and I consider the API now to be at the limit of what I can expect my CS1 students to reasonably master.

John Zelle, PhD
Professor of Computer Science
Wartburg College

________________________________
From: anharrington at gmail.com [anharrington at gmail.com] on behalf of Andrew Harrington [aharrin at luc.edu]
Sent: Wednesday, December 07, 2011 2:27 PM
To: John Zelle
Cc: edu-sig at python.org
Subject: Re: [Edu-sig] mac python graphics

Thanks, Juhn.  I had somehow missed the latest version.
What complications does the single threading bring?

On Wed, Dec 7, 2011 at 12:19 PM, John Zelle <john.zelle at wartburg.edu<mailto:john.zelle at wartburg.edu>> wrote:
Andrew,

We have numerous students and faculty here who are successfully using graphics.py with OSX Lion. The main problem for them was getting the ActiveState Tcl/Tk fix, but it sounds like you have already done that. If IDLE is running, there is no reason that the graphics package should give you difficulties.

I have two quick suggestions. First make sure you have the latest version of the graphics library available from my python page: http://mcsp.wartburg.edu/zelle/python. You probably do have it, as it has not been updated in quite a while. The important thing is that you need the unthreaded iteration of the library.

Second, make sure that every graphics program shuts down properly by executing window.close(). If your processes are hanging up on program termination, this could be the issue. It is not sufficient to simply have the Python program quit.

If neither of these addresses your issue, then I would appreciate it if you would send me a slightly more detailed report letting me know exactly what version of python and Tcl/Tk you are running and providing a simple example program that causes freeze up along with a description of exactly how it locks up.

Cheers,

--John

John Zelle, PhD
Professor of Computer Science
Wartburg College

________________________________
From: edu-sig-bounces+john.zelle=wartburg.edu at python.org<mailto:wartburg.edu at python.org> [edu-sig-bounces+john.zelle=wartburg.edu at python.org<mailto:wartburg.edu at python.org>] on behalf of Andrew Harrington [aharrin at luc.edu<mailto:aharrin at luc.edu>]
Sent: Wednesday, December 07, 2011 11:45 AM
To: edu-sig at python.org<mailto:edu-sig at python.org>
Subject: [Edu-sig] mac python graphics

I just got my first Mac.  I know issues with Mac graphics have been discussed before, but I'm not sure what is relevant with OSX Lion.

With the active state Tcl and the standard python.org<http://python.org> python and idle appears fine.
Still if I try running a Zelle graphic program inside or outside idle I get a freeze.

The massive installation through MacPorts, that uses X11 for graphics makes my Zelle graphics library Tk based programs  work fine, but the X11 version of Idle has many of the common keyboard shortcuts not working, and is (intensionally) not the standard Apple menu setup.

What am I missing?

Thanks,
--
Dr. Andrew N. Harrington
  Computer Science Department
  Loyola University Chicago
Lakeshore office in the Math Department: 205 Loyola Hall
http://www.cs.luc.edu/~anh
Phone: 773-915-7999<tel:773-915-7999>
Fax:    312-915-7998<tel:312-915-7998>
aharrin at luc.edu<mailto:aharrin at luc.edu>





--
Dr. Andrew N. Harrington
  Computer Science Department
  Loyola University Chicago
Lakeshore office in the Math Department: 205 Loyola Hall
http://www.cs.luc.edu/~anh
Phone: 773-915-7999
Fax:    312-915-7998
aharrin at luc.edu<mailto:aharrin at luc.edu>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20111207/f9e9b25f/attachment.html>


More information about the Edu-sig mailing list