Hi, I have a strange error while importing pylab in
> parallel to my own library. In the test script below, my
> function open_spec (which has strictly nothing to do w/
> pylab: it's a swig wrapper to a C-library of mine)
> doesn't act the same if I import pylab first or not:
I assume if you comment out the pylab import the two print statements
are the same?
What version of matplotlib are you using?
If you are dereferencing a memory location you don't own in your
extension code, then anything that changes the memory layout could
lead to the effect you are seeing. What if you replace the 'import
pylab' with other imports, like 'import scipy' or 'import Tkinter'.
Do you see any effect?
matplotlib also includes some SWIG wrapped classes, these are imported
in matplotlib.lines which pylab imports. One way to test if this
might be the source of your troubles (different SWIG runtime
versions?) is to replace the 'import pylab' line with each of the
following in turn
import matplotlib.agg
OR
import matplotlib.lines
OR
import matplotlib.patches
The first two import the SWIG code, the third does not. If the first
two cause the problem and the third does not, it looks like a SWIG
conflict.
JDH