[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? ___

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 files. I haven't been

[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 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 reimplementations can no

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, ie. you must provide

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 back now. I

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 both ways. In my

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

[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

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++... FunctionBase *

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.transfer(). What

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 make sure you call the C++ dtor

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__( self

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 __init__ ( self, other = None ) : if other : FunctionBase.__init__( self, other

[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 January 2005 15:22,

[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);

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 = qbytearray.sip,