[PyKDE] PyKDE] SIP 4.0 problems
Paul F. Kunz
Paul_Kunz at slac.stanford.edu
Fri Apr 9 02:48:00 BST 2004
In this script
import sys
from qt import *
from sihippo import *
app = QApplication ( sys.argv )
ntc = NTupleController.instance()
nt2 = ntc.createCircularBuffer(2)
nt2.setLabels(['Time', 'TEM Current'])
nt2.setTitle('GTIC Test2')
time_list = range(100)
amps = [0.0] * 100
try :
nt2.addColumn('Time', time_list)
nt2.addColumn('TEM Current', amps)
except DataSourceException, detail :
print detail.what()
the nt2.addColumn() throws and exception in C++. If SIPed with -e it
works fine...
[pfkeb at kunz-pbdsl1 sip]$ python cb_addcol.py
NTuple::addColumn: column has wrong size
[pfkeb at kunz-pbdsl1 sip]$
But when SIPed with -e -g it yields ...
pfkeb at kunz-pbdsl1 sip]$ python cb_addcol.py
Segmentation fault (core dumped)
[pfkeb at kunz-pbdsl1 sip]$
It also worked fine with SIP 3.8 and later. This is true both for
Linux and Windows.
The group using this code needs SIP 4.x and the -g option for other
reasons.
What might be the cause of this problem. The .sip file for
DataSourceException.sip is enclosed.
---
class DataSourceException
{
%TypeHeaderCode
#include "datasrcs/DataSourceException.h"
%End
public:
DataSourceException ( const std::string & );
const char * what () const throw ();
char * __str__();
%MethodCode
return PyString_FromString ( sipCpp->what() );
%End
};
More information about the PyQt
mailing list