Hi,
the following code runs fine under Python 2.7.8 but yields segfault with Python 2.6.6.
However, I have to run on this last version of python. Is there a way I could change
my code so that it runs on both versions?
Thanks,
Eric
test_cluster.py:
import ROOT
INSTALL_DIR = "mypath"
ROOT.gSystem.Load("libPhysics.so")
ROOT.gSystem.Load("libFFTW.so")
ROOT.gSystem.Load("libHtml.so")
ROOT.gSystem.Load("libTreeViewer.so")
ROOT.gSystem.Load("HEALPix.so")
ROOT.gSystem.Load(INSTALL_DIR + "wavelet.so")
ROOT.gSystem.Load(INSTALL_DIR + "wavegraph.so")
from ROOT import pixel
mycluster = ROOT.std.vector("pixel")
myclusters = ROOT.std.vector(mycluster)
with pixel declared as a simple struct
typedef struct {
int scaleix; // scale index
int timeix; // time index
int freqix; // freq index
int log2scale; // scale
double time; // time (sec)
double freq; // freq (Hz)
} pixel;
[quote]ipython
Python 2.6.6 (r266:84292, Aug 12 2014, 07:57:07)
Type “copyright”, “credits” or “license” for more information.
IPython 0.10 – An enhanced Interactive Python.
? -> Introduction and overview of IPython’s features.
%quickref -> Quick reference.
help -> Python’s own help system.
object? -> Details about ‘object’. ?object also works, ?? prints more.
In [1]: run test_cluster.py
(Bool_t)1
Note: (file “(tmpfile)”, line 2) File “vector” already loaded
Segmentation fault[/quote]