[Pythonmac-SIG] setting a link to a script using matplolibs WXAgg fails
Christian Meesters
meesters at uni-mainz.de
Sat May 28 13:13:25 CEST 2005
Hi
Currently I'm writing a bunch of scripts for batch processing and a few
for graphical display of my data. During the process of writing I
simply put links in /usr/local/bin to my scripting directory. Invoking
the 'non-graphical' scripts this way in any directory is no problem.
Calling the 'graphical' scripts via one of the links results in the
following error messages:
import: unable to open X server `'.
import: unable to open X server `'.
/usr/local/bin/SPlot: line 14: syntax error near unexpected token
`'WXAgg''
/usr/local/bin/SPlot: line 14: `matplotlib.use('WXAgg')
Well, as you can see I'm using matplotlib with the WXAgg backend. The
code here is simply:
<snip, some comments>
import os
import matplotlib
matplotlib.use('WXAgg') #line 14
This happens regardless of whether I use the WX or WXAgg backend and
the program is running just fine if I start it with pythonw directly.
(I should mention that I'm still stuck with Panther and - in this case
for reasons of backwards compatibility; can't install matplotlib for
python 2.4 - with Apple's python 2.3.)
Any hints? I don't even know whether this problem is wx related or the
reasons are buried in Apple's framework install. So, should I contact a
different list?
Thanks,
Christian
More information about the Pythonmac-SIG
mailing list