Re: [PyKDE] Re: How to embed Python in C++

2006-03-27 Thread David Boddie
On Saturday 25 March 2006, I wrote: > > On Fri, 24 Mar 2006 17:40:00, Eric Jardim wrote: [Defining a factory function] > It's easy to define a single function to do this: > > PyRun_String("from PyQt4 import QtGui\nimport sip\n" > "def __embedded_factory__create__(parent = N

Re: [PyKDE] Re: How to embed Python in C++

2006-03-25 Thread David Boddie
On Fri, 24 Mar 2006 17:40:00, Eric Jardim wrote: > I found a way of getting Python extended widgets. > > I will post here the way I did and I would like to know if this is the > right, easy and safer way of doing this: I've added comments below. > Supose this is a QWidget subclass and that I wro

Re: [PyKDE] Re: How to embed Python in C++

2006-03-24 Thread Eric Jardim
I found a way of getting Python extended widgets. I will post here the way I did and I would like to know if this is the right, easy and safer way of doing this: Supose this is a QWidget subclass and that I wrote a module called "MyWidget.py" with "MyWidget" class defined inside of it. // let's

Re: [PyKDE] Re: How to embed Python in C++

2006-03-24 Thread Eric Jardim
2006/3/24, Phil Thompson <[EMAIL PROTECTED]>: Make sure you are looking at current snapshots. Sure. I'm using 2006/03/17 version. > Is there any ".so" where I can find this "sipForceConvertTo_QWidget"? This is old style - deprecated in current snapshots. You won't find thefunctions themselves as th

Re: [PyKDE] Re: How to embed Python in C++

2006-03-24 Thread Phil Thompson
On Friday 24 March 2006 1:36 pm, Eric Jardim wrote: > 2006/3/22, Phil Thompson <[EMAIL PROTECTED]>: > > On Wednesday 22 March 2006 10:56 am, Eric Jardim wrote: > > sipForceConvertToInstance() and related functions. It's all in the SIP > > docs. > > Sorry, but I can't find this functions. Does anybo

Re: [PyKDE] Re: How to embed Python in C++

2006-03-24 Thread Eric Jardim
2006/3/22, Phil Thompson <[EMAIL PROTECTED]>: On Wednesday 22 March 2006 10:56 am, Eric Jardim wrote:sipForceConvertToInstance() and related functions. It's all in the SIP docs. Sorry, but I can't find this functions. Does anybody have any example or tutorial? Is there any ".so" where I can find t

Re: [review] [PyKDE] Re: How to embed Python in C++

2006-03-22 Thread Jim Bublitz
On Wednesday 22 March 2006 02:56, Eric Jardim wrote: > 2006/3/21, Eric Jardim <[EMAIL PROTECTED]>: > > How do I embed Python script in C++? > > C'mon folks... > > How do I convert a "PyObject*" to a "QWidget*" returned from a function > like "PyRun_String()"? Or you can use sip.wrapinstance and si

Re: [PyKDE] Re: How to embed Python in C++

2006-03-22 Thread Phil Thompson
On Wednesday 22 March 2006 10:56 am, Eric Jardim wrote: > 2006/3/21, Eric Jardim <[EMAIL PROTECTED]>: > > How do I embed Python script in C++? > > C'mon folks... > > How do I convert a "PyObject*" to a "QWidget*" returned from a function > like "PyRun_String()"? sipForceConvertToInstance() and rel

[PyKDE] Re: How to embed Python in C++

2006-03-22 Thread Eric Jardim
2006/3/21, Eric Jardim <[EMAIL PROTECTED]>: How do I embed Python script in C++? C'mon folks... How do I convert a "PyObject*" to a "QWidget*" returned from a function like "PyRun_String()"? Thanks, -- Eric Jardim ___ PyKDE mailing listPyKDE@mats.