[PyKDE] Qwt-0.3, Numerical Python, Black Adder, etc

Gerard Vermeulen gvermeul at labs.polycnrs-gre.fr
Mon Mar 5 19:47:23 GMT 2001


Hi Phil, Mark

I have a set of alpha Python bindings to the Qwt-0.3 library.
Qwt stands for "Qt Widgets for Technical applications" and
version 0.3 works with Qt-2.x.

For more info: http://qwt.sourceforge.net/

Some of the code is stolen from Mark Colclough's bindings
to Qwt-0.2 (which works with Qt-1.x)
See http://www.cm.ph.bham.ac.uk/software/pyqt

One of my improvements is that it interfaces to the Numerical
Python library, see http://numpy.sourceforge.net/
This library allows you to manipulate arrays of numbers as
if it were numbers (in MatLab style).

Example, the three lines:
x = arrayrange(0.0, 100.0, 0.1)
y = sin(x)
z = cos(y)*exp(-x*x)
creates an x array of 1000 numbers: 0.1, 0.2, 0.3,...
and corresponding y and z arrays

The interface to Qwt solves one of the great weaknesses of
Python on Linux: data plotting.

Question 1:
To make this work, I have to add after the line:
Py_InitModule("libqwtc",methods);
import_array();
in the initlibqwtc() function in qwtcmodule.cpp
Is there a way to tell sip to do that automatically?
(a kind of before-InitModule hook and after-InitModule hook)

Question 2:
I have installed Python-2.0 on my Mandrake-7.2 system and
also boughth a personal edition of Black Adder.
At least superficially, it looks like if there are
name conflicts in /usr/lib/python2.0/site-packages
Black Adder has:libbaqtcmodule.so*, qt.py
PyQt has: libbqtcmodule.so*, and qt.py

Can I remove PyQt, rebuild my PyQwt using the .sip files
of PyQt and expect that it will work with Black Adder?
Or, if there is any NON-FREE code in libbaqtcmodule, could you
split it up between a free PyQt part and a NON-FREE Black Adder
part?

Gerard

PS: I will put the bindings on the WEB shortly. If anybody is
interested, ask me and I will send the code.

-- 
Gerard Vermeulen                           |  TEL: 33 (0)4 76 88 12 53
CRTBT                                      |   or  33 (0)4 76 88 12 61
BP 166 -- 38042 Grenoble Cedex 9 -- France |  Fax: 33 (0)4 76 87 50 60
http://www-crtbt.polycnrs-gre.fr/he3pol




More information about the PyQt mailing list