Newbie: Tkinter and macPython

gt gtewalt at earthlink.net
Tue Jul 1 14:48:16 EDT 2003


"Russell E. Owen" <no at spam.invalid> wrote in message news:<bdq5nv$2bdo$1 at nntp6.u.washington.edu>...
> In article <f9b7c11d.0306281825.5cf24367 at posting.google.com>,
>  gtewalt at earthlink.net (gt) wrote:
> 
> >I'm waffling between Ruby, and Python as a programming
> >language.
> >I borrowed a friends book on Ruby, and have played with 
> >it a bit.
> >I went by the library to check out 'Learning Python'
> >but i was too late, the library had closed already...
> >
> >Anyway, to the point.
> >I downloaded macPython for OSX, and was trying to get
> >a simpe Tkinter example to work form Lundh's tutorial,
> >I think it was.
> >Bu I get an error...
> >
> ># File: hello1.py
> 
> You have hit MacPython at a slightly awkward time. MacPython (through 
> version 2.2.x) runs as a carbon application on MacOS X and the Tk 
> interface was never "carbonized" (I think because the underlying Tk was 
> never carbonized, but whatever the reason, the fact is it will not 
> work). (MacPython can also be configured as a classic app, simply by 
> double clicking the suitable application in the installation, in which 
> case Tkinter runs just fine at least if you boot into MacOS 9, I'm not 
> sure if it runs in Classic emulation mode.)
> 
> If you want to run Python 2.2.x/Tkinter on MacOS X you can do it as 
> follows:
> 
> Download and install aqua tcl/tk. Version 8.4.1 is the latest that will 
> work with Python 2.2.x. A binary distribution is available from 
> <http://www.maths.mq.edu.au/~steffen/tcltk/TclTkAqua/>; there are three 
> flavors available; I recommend TclTkAqua (having "wish" around is nice. 
> I'm not sure the full "BI" version adds anything you'll find useful.
> 
> Download and install Python. For Python 2.2.x I suggest using Bob 
> Ippolito's binary installer <http://redivi.com/~bob/>, since it includes 
> Tkinter and some other useful stuff already built. Note that it also 
> includes wxPython, an alternate GUI that you may wish to look at.
> 
> If you prefer to install thiss stuff from source, my home page 
> <http://www.astro.washington.edu/owen/> has a suitable link. Installing 
> from source is not for the faint of heart (though it'll be easier for 
> Python 2.3).
> 
> Warning: unix Python 2.2.2 requires \n line endings for files, which is 
> not the Mac norm. Any decent text editor (e.g. BBEdit or Pepper) *can* 
> save files with \n, but you have to configure it to do it. This problem 
> will go away with Python 2.3.
> 
> 
> Python 2.3 will be the first version that unifies "MacPython" and unix 
> Python (thanks to hard work by Jack Jansen and others). Python 2.3b1 is 
> available now from Jack's MacPython site 
> <http://homepages.cwi.nl/~jack/macpython.html>. Install aqua Tk/tcl as 
> above, then install the 2.3b1 binary installer. You have to do a bit 
> more work to get Tkinter installed -- I think MacPython 2.3b1 comes with 
> a package manager that will do the job, but I've not yet tried it.
> 
> I personally use both 2.3b1 and have had no problems with it. (I 
> actually have a dual installation; 2.3b1 with aqua Tk and 2.2.2 with 
> unix style x-windowing Tk; both work well.)
> 
> In conclusion, life will be grand when Python 2.3 is released. Meanwhile 
> it's a bit of work, but not too bad.
> 
> 
> I hope this helps.
> 
> -- Russell

Wow.
I never expected anything this thourough for a response.
Thanks Russell.
I have actually installed MacPython 2.3b1.
I tried the package manager, but at the time it wouldnt connect to
the 'database' (if I remember correctly)
At any rate, it looks like I need aqua Tk.
It would seem that I should un-install 2.3b1, install
aqua Tk, then reinstall 2.3b1 and implement the package manager.
Thanks again.

  -- Greg




More information about the Python-list mailing list