[Pythonmac-SIG] Solution to some SWIG Install problems on Mac OS X

Christopher Barker Chris.Barker at noaa.gov
Wed Dec 14 19:15:40 CET 2005

HI all,

Perhaps this is getting bit off-topic, but other seemed interested, so here 
goes. By the way, I didn't intend to send my whole diatribe about Windows 
security to the list, sorry about that.

On Tuesday 13 December 2005 9:41 am, Louis Pecora wrote:

> For graphics, I have chosen wxPython.  I know there is matplotlib, but
> using it interactively baffled me (although several nice people sent me
> examples).  I may include it in my toolbox in the future.

Well, matplotlib and wxPython solve very different problems. MPL by itself is 
not intended to build applications with. to do that, you use another GUI 
toolkit (wxPython, PyGtk, TkInter), and if you need plotting, you can embedd 
MPL windows in your app. There has been a long recent thread about doing this 
with wxPython on the MPL list recently. If you need plotting in your apps, be 
sure to read it.

You might also want to check out wx.lib.floatcanvas. It's designed to display 
and interact with data in arbitrary floating point coordinates. It provides 
zooming and panning and simple projections(for maps). It could be useful. If 
it looks like it is, let me know and I'll send you the latest version and 
some more examples of how to use it (I wrote it).

>  I have yet to learn that and I
> still mostly do print  readline kind of I/0 and menus.  I keep it
> simple, but occasionally GUI stuff is useful.

Yes, it is, but it takes a lot longer to write GUI code than simple raw0input 

Get yourself on the wxPython-users list. In particular, check the recent 
threads initiated by Rich Shepard. he's like you: A scientist without a whole 
lot of CS background, learning wxPython for apps to drive his models.

> Yeah, the dangers of other's login scripts, huh?  Well, I switched it to
> gcc so I assume it should be better now.

I'd remove that setenv call altogether, It might override Apple's defaults, 
and break other things. If you switch to bash, that will kill it. Then you'll 
probably need a .profile file with at least this in it:

export PATH="$PATH:/usr/local/bin"
export PATH="/usr/local/bin:$PATH"

depending on whether you want your stuff or Apple's as default in your shell.

Rob Managan wrote:
> While I have not tried WxPython I have built C modules for python 
> using SWIG and python's distutils. That trades the headaches of 
> makefiles for writing a setup.py file. I can give an example and they 
> really are not that bad once you have done it once!

I'd love to see an example. Does it run SWIG for you too?

> Is distutils more for distributing packages/modules than developing?

Absolutely necessary for developing extensions. And not hard for simple 
Bob Ippolito wrote:
> However, setuptools is also useful for pure Python development,  

Bob, what do you see as the future of setuptools? Will in be in the standard 
lib in future versions?


Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Pythonmac-SIG mailing list