[Pythonmac-SIG] Beginner's questions

Jack Jansen Jack.Jansen at cwi.nl
Fri Dec 26 16:54:51 EST 2003


On 25-dec-03, at 20:00, Konrad Hinsen wrote:

> 1) My iBook runs MacOS 10.3.2, which apparently translates to Darwin 
> 7.2.0. The package database for Panther is for 7.0.0, so I always need 
> to type (or paste) a longish URL into the package manager. Is there 
> any way to tell it to memorize that address? Or could the database 
> managers be convinced to add a second URL for the existing database?

This is my fault: I hadn't noticed Apple had updated the darwin version 
number for 10.3.2 (they didn't do so for 10.3.1). I really have to get 
a patch version of pimp out that is slightly more intelligent about 
database location (it should first try for "darwin-7.2.0" and if that 
fails fall back to "darwin-7" and maybe even "darwin").

I've fixed this by duplicating the database.

> 2) I installed the tkinter module plus an AquaTk binary distribution. 
> When I run a Tk program with that combination from the MacPython IDE, 
> nothing happens. Running the same program from the command line makes 
> it run in the background (the terminal continues to have the keyboard 
> focus), and when I try to bring the window to the front I get an error 
> message. Not very usable to say the least...

You cannot run Tkinter programs from the IDE. Nor, for that matter, 
Cocoa programs or wxWindows programs or anything else that uses a 
different GUI toolkit than the IDE does. I will add an FAQ entry on 
this (I thought this was already there, but apparently it wasn't).

You need to run such scripts either through PythonLauncher (select 
"Open with" in the finder, select PythonLauncher) or through "pythonw 
script.py" from the Terminal command line.

> 3) MacPython does have distutils, so I thought I could install some 
> additional packages. I didn't get very far: the first package I tried 
> needs the NumPy header files, which are not part of the NumPy package 
> (binary) that I installed through the package manager. Bug or feature?

Definitely a known problem, but there is no "correct" solution: it's 
really a Python design problem. Numeric expects to install its headers 
into $prefix/include/python2.3, but on MacOSX 10.3 this directory is 
"owned" by Apple. The workaround is to make this directory writable, 
the hidden PackMan package WriteableInclude has a recipe for this, and 
then install Numeric.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman




More information about the Pythonmac-SIG mailing list