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 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 Fax: 312-915-7998 aharrin@luc.edu
On Dec 7, 2011, at 12:45 PM, Andrew Harrington wrote:
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 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 Fax: 312-915-7998 aharrin@luc.edu
Are you closing the GraphWin window before exiting your program? from graphics import * win = GraphWin() # do other stuff win.close() # this is the important line (without it, I think it does freeze) I keep forgetting to ask John about this to see if there's something we could do to modify graphics.py so this isn't necessary. I don't think I've done anything else to the standard python.org (i.e., I installed Python 3.2.2 on Lion, but didn't download anything extra such as Tcl). You do need a newer Tcl than comes with Snow Leopard (Idle tells you this in the shell window when you open it), but I think it works fine with Leopard as long as you close the window. HTH, Dave
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@python.org [edu-sig-bounces+john.zelle=wartburg.edu@python.org] on behalf of Andrew Harrington [aharrin@luc.edu] Sent: Wednesday, December 07, 2011 11:45 AM To: edu-sig@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 Fax: 312-915-7998 aharrin@luc.edu<mailto:aharrin@luc.edu>
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@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@python.org[edu-sig-bounces+john.zelle= wartburg.edu@python.org] on behalf of Andrew Harrington [aharrin@luc.edu] *Sent:* Wednesday, December 07, 2011 11:45 AM *To:* edu-sig@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 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 Fax: 312-915-7998 aharrin@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@luc.edu
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@gmail.com [anharrington@gmail.com] on behalf of Andrew Harrington [aharrin@luc.edu] Sent: Wednesday, December 07, 2011 2:27 PM To: John Zelle Cc: edu-sig@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@wartburg.edu<mailto:john.zelle@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@python.org<mailto:wartburg.edu@python.org> [edu-sig-bounces+john.zelle=wartburg.edu@python.org<mailto:wartburg.edu@python.org>] on behalf of Andrew Harrington [aharrin@luc.edu<mailto:aharrin@luc.edu>] Sent: Wednesday, December 07, 2011 11:45 AM To: edu-sig@python.org<mailto:edu-sig@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@luc.edu<mailto:aharrin@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@luc.edu<mailto:aharrin@luc.edu>
Somewhat tangentially bouncing around in this vicinity, I offer these remarks re our situation at work, where we want students connecting over the wire to have good first experience using Python. Retention is an issue. The school's guiding philosophy requires providing real hands-on programming experiences and real interactivity with a full Python console, which until recently has meant booting a remote desktop into a server, running a session of Eclipse on a Windows server in Illinois (front end client could be anything). Here's a picture of the rig: http://controlroom.blogspot.com/2011/06/back-office.html Part of what keeps us in Eclipse is Tkinter. Our students can do widgets programming. We do not have the Zelle package installed, but would like to add it. We already work with Wolfram and have new kind of science exhibits working in the wings (I've posted about that here already), but so far only in ASCII (console i/o). Getting Game of Life type CA stuff running with graphics.py has already been done right here in this very archive, in earlier versions of Python. Anyway, a lot of students feel overwhelmed by Eclipse and have a hard time distinguishing between Python-the-language and the surrounding IDE. Many are brand new to programming, having heard Python is a friendlier-than-most language, winning the "best language ever" award a 3rd time in a row, didn't I just read? http://www.linuxjournal.com/slideshow/readers-choice-2011?page=27 However just recently, management has decided to swap out Eclipse in the first unit and go with a Javascript and Java enabled front end in a browser, already used to teach Perl. We can get away with this in the first unit only because Tk / Widget programming doesn't happen until the second unit. We'll ease them over to Eclipse having won their loyalty on the basis of Python (plus Coderunner, the name for the teaching tool). In the new configuration, no need for remote desktop, a less shaky connection. So even if you loved Eclipse, your situation may improve. The ability to learn widget programming interactively, writing your own programs, without having to install anything locally, not even Python itself, is a marketable feature. Then we have highly trained mentors to back it up, so there's no sense of "just a machine" on the back end. Works well so far (a relatively new gig for me, but this team has been at it for quite awhile). Kirby
Argh. iPhone big finger button clumsiness. Don't know if my reply sent or not. So trying again... Try running idle in no sub process mode. Add -n to the cmd line args. On 12/7/11, Andrew Harrington <aharrin@luc.edu> wrote:
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 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 Fax: 312-915-7998 aharrin@luc.edu
participants (5)
-
Andrew Harrington
-
davelist@mac.com
-
Jason R Briggs
-
John Zelle
-
Kirby Urner