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:
···
----
#!/usr/bin/env python
import sys
import IFU_py_io as IFU # IFU_C_iolibs wrapper
IFU.set_user_dataformat()
spec = IFU.SPECTRUM()
for specName in sys.argv[1:]: # Loop over spectra
print "BEFORE pylab:", specName,
IFU.open_spec(spec,specName,"i")
print "(%d px, start=%.2f, step=%.2f)" % (spec.npts,spec.start,spec.step)
import pylab # Matplotlib
for specName in sys.argv[1:]: # Loop over spectra
print "AFTER pylab:", specName,
IFU.open_spec(spec,specName,"i")
print "(%d px, start=%.2f, step=%.2f)" % (spec.npts,spec.start,spec.step)
----
The output result is:
BEFORE pylab: spec_113_C05_081_033_B.fits (1177 px, start=3200.00, step=2.38)
AFTER pylab: spec_113_C05_081_033_B.fits (1177 px, start=1.00, step=1.00)
while absolutely no pylab function is used in the IFU package...
Do you have an idea of what could happen?
Cheers.
--
.~. Yannick COPIN (o:>* Doctus cum libro
/V\ Institut de physique nucleaire de Lyon (IN2P3 - France)
// \\ Tel: (33/0) 472 431 968 AIM: YnCopin ICQ: 236931013
/( )\ http://snovae.in2p3.fr/ycopin/
^`~'^
--
.~. Yannick COPIN (o:>* Doctus cum libro
/V\ Institut de physique nucleaire de Lyon (IN2P3 - France)
// \\ Tel: (33/0) 472 431 968 AIM: YnCopin ICQ: 236931013
/( )\ http://snovae.in2p3.fr/ycopin/
^`~'^