Re: [PyKDE] Classes incorrectly marked as abstract

2005-11-16 Thread Paul F. Kunz
> On Wed, 16 Nov 2005 15:35:52 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: >> Starting with some recent release of SIP, some of my exposed C++ >> classes are being marked as abstract to Python. Obviously, some >> change in SIP requires that I make some changes to my .sip fil

[PyKDE] Classes incorrectly marked as abstract

2005-11-16 Thread Paul F. Kunz
Starting with some recent release of SIP, some of my exposed C++ classes are being marked as abstract to Python. Obviously, some change in SIP requires that I make some changes to my .sip files. I haven't been able to figure it out. Any hints? ___

[PyKDE] QApplication without GUI

2005-11-11 Thread Paul F. Kunz
Is there a reason that QApplication ( int& argc, char ** argv, bool ) is not exposed to Python in PyQt. We could use it. ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Re: clone member function deleting object

2005-03-16 Thread Paul F. Kunz
> On Wed, 16 Mar 2005 14:12:55 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: >>> On Wed, 16 Mar 2005 09:42:36 - (GMT), "Phil Thompson" >>> <[EMAIL PROTECTED]> said: >> >>> You use sipTransfer() - but you must call it before the Python >>> object is garbage collected

Re: [PyKDE] Re: clone member function deleting object

2005-03-16 Thread Paul F. Kunz
> On Wed, 16 Mar 2005 09:42:36 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: > sipPySelf is the pointer to the Python instance object. It is reset > to 0 to show that it has been garbage collected. Unfortunately, as > you have found, it means the Python virtual reimplementatio

Re: [PyKDE] Re: clone member function deleting object

2005-03-15 Thread Paul F. Kunz
Using sip.transfer(), as Phil suggested, keeps the destructor of my object created by clone() from being destroyed. However, my object is still not useable as it can't find the Python implemented methods when it is called from C++ after return of clone. Poking around, I found that sipFunct

Re: [PyKDE] Re: clone member function deleting object

2005-03-15 Thread Paul F. Kunz
> On Tue, 15 Mar 2005 14:38:05 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: > ...and it's virtual. I've eventually got it - I'm so used to > thinking about extending Python with C++ that I hadn't appreciated > properly that you are extending C++ with Python. Yes, it works bo

Re: [PyKDE] Re: clone member function deleting object

2005-03-15 Thread Paul F. Kunz
> On Tue, 15 Mar 2005 09:09:02 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: >> I can't get to the sip documentation pages right now, >> river-bank.demon.co.uk not responding. I can see from Python that >> sip.transfer takes two arguments. What are they? > It seems to be ba

Re: [PyKDE] Re: clone member function deleting object

2005-03-14 Thread Paul F. Kunz
> On Mon, 14 Mar 2005 17:55:21 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: >>> On Mon, 14 Mar 2005 16:54:49 - (GMT), "Phil Thompson" >>> <[EMAIL PROTECTED]> said: >> >>> You must either keep a reference or transfer ownership to C++ >>> using sip.transfer() - and m

Re: [PyKDE] Re: clone member function deleting object

2005-03-14 Thread Paul F. Kunz
> On Mon, 14 Mar 2005 16:54:49 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: > You must either keep a reference or transfer ownership to C++ using > sip.transfer() - and make sure you call the C++ dtor explicitly at > some stage to avoid a memory leak. I'll try sip.transfe

Re: [PyKDE] Re: clone member function deleting object

2005-03-14 Thread Paul F. Kunz
> On Mon, 14 Mar 2005 15:34:04 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: >>> On Thu, 3 Mar 2005 09:17:07 - (GMT), "Phil Thompson" >>> <[EMAIL PROTECTED]> said: >> Enabling tracing with SIP, I get the following when I call the >> clone() member function in C++..

[PyKDE] Re: clone member function deleting object

2005-03-14 Thread Paul F. Kunz
> On Thu, 3 Mar 2005 09:17:07 - (GMT), "Phil Thompson" <[EMAIL > PROTECTED]> said: Enabling tracing with SIP, I get the following when I call the clone() member function in C++... FunctionBase * sipFunctionBase::clone() const (this=0x083b0878) python.clone sipFunctionBase::sipFunc

[PyKDE] Re: Problem with virtual clone function

2005-03-13 Thread Paul F. Kunz
> On Fri, 11 Mar 2005 19:11:56 +, Phil Thompson <[EMAIL PROTECTED]> > said: > There is nothing obviously wrong with the Python. You can try > building your module with tracing enabled (sip -r) to see exactly > when the C++ dtors are being called. My sip command now looks like ...

Re: [PyKDE] ANN: PyQt v3.14, SIP v4.2, QScintilla v1.5 Released

2005-03-11 Thread Paul F. Kunz
>>>>> On Fri, 11 Mar 2005 19:11:56 +, Phil Thompson <[EMAIL PROTECTED]> >>>>> said: > On Friday 11 March 2005 6:08 pm, Paul F. Kunz wrote: >> I ahve the following Python class defined... >> >> class Linear ( FunctionBase ) : def __i

Re: [PyKDE] ANN: PyQt v3.14, SIP v4.2, QScintilla v1.5 Released

2005-03-11 Thread Paul F. Kunz
I ahve the following Python class defined... class Linear ( FunctionBase ) : def __init__ ( self, other = None ) : if other : FunctionBase.__init__( self, other ) print "copy" self.initialize () else: FunctionBase.__init__( sel

[PyKDE] pure virtual and operator ()

2005-03-02 Thread Paul F. Kunz
I'm trying to expose an abstract base class. In my .sip file I have virtual double operator()(double) const = 0; >From sip command I get sip -e -g -c . -I /usr/local/share/sip -I /usr/local/share/sip/qtcanvas -I ../../hippodraw/sip \ -t Qt_3_3_0 -t WS_X11 ../../hippodraw/sip/sihippo.sip

Re: [PyKDE] Plotting simple 2D graphics

2005-02-01 Thread Paul F. Kunz
> On Tue, 1 Feb 2005 09:38:10 -0200, > =?iso-8859-1?q?Fl=E1vio_Code=E7o_Coelho?= <[EMAIL PROTECTED]> said: > I know that Matplotlib will soon have a working Qt backend. You > might want to check with them to see how close to completion this > backend is. > Flávio > On Wednesday 26 Jan

[PyKDE] Memory leak in converstion to std::string & ?

2004-08-12 Thread Paul F. Kunz
I have a C++ class with a method virtual void setAutoTicks ( const std::string &, bool ); I wrote the ConvertToTypeCode this... %ConvertToTypeCode // Allow a Python string whenever a string is expected. if (sipIsErr == NULL) return PyString_Check(sipPy);

[PyKDE] Re: PyKDE] SIP 4.0 problems

2004-04-12 Thread Paul F. Kunz
> On Sat, 10 Apr 2004 19:20:52 +0100, Phil Thompson <[EMAIL PROTECTED]> said: > There is a bug in SIP v4 (fixed in tonight's snapshot) that happens > only if you specify both the -e and -g flags - but I'm not convinced > it would affect the above. (Depends on what the rest of your module > is

[PyKDE] PyKDE] SIP 4.0 problems

2004-04-08 Thread Paul F. Kunz
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.addColu

Re: [PyKDE] Heirarchy of header files !!

2003-08-15 Thread Paul F. Kunz
> On Thu, 14 Aug 2003 21:40:55 -0700, Jim Bublitz <[EMAIL PROTECTED]> said: I feel a lot calmer now, that my SIP problems have been resolved. > If run time errors were rare, none of us would bother testing > code. Especially in C++. I didn't mean to imply that my C++ code runs correctl

Re: Wrapper packages (was Re: [PyKDE] Heirarchy of header files !!)

2003-08-15 Thread Paul F. Kunz
> On Fri, 15 Aug 2003 07:47:17 -0700, Dave Kuhlman <[EMAIL PROTECTED]> said: > Here is a link to a comparison document that may be of help: > http://dales.rmplc.co.uk/Duncan/accu/integratingpython.html Was that comparison written before or after SWIG support for C++ greatly improved?

Re: Wrapper packages (was Re: [PyKDE] Heirarchy of header files !!)

2003-08-15 Thread Paul F. Kunz
> On Fri, 15 Aug 2003 10:31:56 -0400 (EDT), Charles Mason Iv <[EMAIL PROTECTED]> > said: > One person stated that you should > only use SIP if you plan on interfacing with Qt. If you are using PyQt to build your Qt application with Python, then Python extension modules built with Boost.P

Re: [PyKDE] Heirarchy of header files !!

2003-08-14 Thread Paul F. Kunz
> On Thu, 14 Aug 2003 21:10:51 -0400, "satish k.chimakurthi" <[EMAIL PROTECTED]> > said: > Hi Phil, Thanks for your response. > I have a huge software library written in C++...I have nearly 50 > headerfiles in itI wrote a small code for my application using > some classes which are d

Re: [PyKDE] Re: Learning C++

2003-08-14 Thread Paul F. Kunz
> On Wed, 13 Aug 2003 09:03:27 -0700, Jonathan Gardner <[EMAIL PROTECTED]> said: > My only point was that learning C++ is easier after learning C. I > was hoping he would develop the skills to read and understand all > forms of C and C++, not necessarily the skills to write C++. I've taugh

Re: [PyKDE] SIP Support for C++ Operators and Exceptions

2003-07-25 Thread Paul F. Kunz
> On Fri, 25 Jul 2003 16:30:01 +0100, Phil Thompson <[EMAIL PROTECTED]> said: >> > What if you implement __str__() for your exception class? >> >> I suppose you mean to implement this in the .sip file. Can you >> point to an example of doing this in the PyQt sources? > grep __str__ *.sip =>

Re: [PyKDE] SIP Support for C++ Operators and Exceptions

2003-07-25 Thread Paul F. Kunz
> On Fri, 25 Jul 2003 09:48:59 +0100, Phil Thompson <[EMAIL PROTECTED]> said: > On Friday 25 July 2003 12:01 am, Tuvi, Selim wrote: >> Phil, we just tried your suggestion and added a wrapped exception >> class and enabled the -e flag. >> >> Although it does translate the C++ exception to Pyth

Re: [PyKDE] SIP and overloaded non-pure virtual functions

2003-05-30 Thread Paul F. Kunz
>>>>> On Thu, 29 May 2003 18:56:06 +0100, Phil Thompson <[EMAIL PROTECTED]> said: > On Thursday 29 May 2003 1:15 am, Paul F. Kunz wrote: >> In my PlotterBase.zip file I have >> >> class PlotterBase { >> >> public: >> >> Plotter

[PyKDE] SIP and overloaded non-pure virtual functions

2003-05-29 Thread Paul F. Kunz
In my PlotterBase.zip file I have class PlotterBase { public: PlotterBase ( const std::string & ); void setRange ( const std::string &, double, double ); virtual void setBinWidth ( const std::string &, double ); In the C++ code there's an implementation that is overridden by a number o