Re: [PyKDE] Sugestions for PyQt4

2006-03-21 Thread Sundance
I heard Giovanni Bajo said: As I said elsewhere, I believe this kind of improvements belongs to a separate wrapper, such as PyPyQt built on top of PyQt. Others would prefer a PyQt compilation switch or something like that. Hello Giovanni, I'd cast my vote in favor of a wrapper. I think we

Re: [PyKDE] Sugestions for PyQt4

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 9:54 am, Sundance wrote: I heard Giovanni Bajo said: As I said elsewhere, I believe this kind of improvements belongs to a separate wrapper, such as PyPyQt built on top of PyQt. Others would prefer a PyQt compilation switch or something like that. Hello Giovanni,

[PyKDE] SIP: size_t?

2006-03-21 Thread Giovanni Bajo
Hello, what is the correct way of handling size_t? It's not a builtin type that SIP understands, and any typedef machinery is going to be wrong (portability-wise). -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de

[PyKDE] sipdistutils fix relinking

2006-03-21 Thread Giovanni Bajo
Phil, I found a bug in sipdistutils: even if it's not necessary to call 'sip' because the generated files are up-to-date, it's still necessary to add them into the list of files to compile/link. The attacched patch fixes the problem. Thanks -- Giovanni Bajo ---

[PyKDE] Plotting points in PyQT

2006-03-21 Thread Vines, John (Civ, ARL/CISD)
Title: Plotting points in PyQT All, I have a VTK application which stores my point values as doubles. I need to plot these doubles on a canvas. How would I go about plotting these points? Thanks in advance, John ___ PyKDE mailing list

[PyKDE] How to embed Python in C++

2006-03-21 Thread Eric Jardim
How do I embed Python script in C++? For example, how do I get a Python extended widget in a C++ application? QWidget* widget = getMyPythonWidgetFromThisFile(MyWidget.py, MyWidget); I know how to do this with Boost.Python easily, but have no clue to do this with PyQt/SIP. This would be

[PyKDE] Pickle with QT

2006-03-21 Thread Maxwell Bottiger
Hey all, I wanted to make a really simple save/load procedure for my Qt application. I was hoping I could use pickle to capture the state of my whole class and write it out, but whenever I try this I get a seg fault in sip. I'll show the backtrace and some of the code below. This is my first try

Re: [PyKDE] SIP: size_t?

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 2:24 pm, Giovanni Bajo wrote: Hello, what is the correct way of handling size_t? It's not a builtin type that SIP understands, and any typedef machinery is going to be wrong (portability-wise). You have to make the typedef dependent on the %Platform. Phil

Re: [PyKDE] SIP: size_t?

2006-03-21 Thread Giovanni Bajo
Phil Thompson [EMAIL PROTECTED] wrote: what is the correct way of handling size_t? It's not a builtin type that SIP understands, and any typedef machinery is going to be wrong (portability-wise). You have to make the typedef dependent on the %Platform. Wouldn't be better if SIP did this

Re: [PyKDE] SIP: undocumented API for enums

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 6:24 pm, Giovanni Bajo wrote: Hello, I found out there is an undocumented sipConvertFromNamedEnum. Should it be documented? Maybe there are other undocumented functions as well. There are lots of undocumented functions. They are undocumented because they are not

Re: [PyKDE] SIP: undocumented API for enums

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 6:56 pm, Giovanni Bajo wrote: Phil Thompson [EMAIL PROTECTED] wrote: I found out there is an undocumented sipConvertFromNamedEnum. Should it be documented? Maybe there are other undocumented functions as well. There are lots of undocumented functions. They are

Re: [PyKDE] Pickle with QT

2006-03-21 Thread Eron Lloyd
I believe Python doesn't allow wrapped objects to be pickled; in other words, if your class inherits from any Qt class, you'll need to look at other serialization solutions. Eron On 3/21/06, Maxwell Bottiger [EMAIL PROTECTED] wrote: Hey all, I wanted to make a really simple save/load

Re: [PyKDE] Pickle with QT

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 4:08 pm, Maxwell Bottiger wrote: Hey all, I wanted to make a really simple save/load procedure for my Qt application. I was hoping I could use pickle to capture the state of my whole class and write it out, but whenever I try this I get a seg fault in sip. I'll show

Re: [PyKDE] SIP: MappedType for pointers?

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 6:23 pm, Giovanni Bajo wrote: Hello, I'm writing a SIP wrapper for a serie of overloaded functions like this: void Foo(char *str); void Foo(wchar_t *str); void Bar(char *str); void Bar(wchar_t *str); [etc.] Python supports conversion to/from wchar_t buffers

Re: [PyKDE] SIP: adding code to methods?

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 2:22 pm, Giovanni Bajo wrote: Hello, I'm wrapping a C++ class which is defined like this: class Foo { public: [ many methods that can fail...] int Error(); }; The idea is that instead of returning error codes, the C++ methods silenty succeed, and

Re: Fwd: Fwd: [PyKDE] Qt objects subclasses and __dict__ copies

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 10:32 pm, Daniele Varrazzo wrote: On a related topic, Edward Loper reported: Original Message Subject: Introspection of qt classes It appears that all classes in the Python qt module lie about what module they come from: import qt

Re: Fwd: Fwd: [PyKDE] Qt objects subclasses and __dict__ copies

2006-03-21 Thread Daniele Varrazzo
On 3/22/06, Phil Thompson [EMAIL PROTECTED] wrote: On Tuesday 21 March 2006 10:32 pm, Daniele Varrazzo wrote: On a related topic, Edward Loper reported: Original Message Subject: Introspection of qt classes It appears that all classes in the Python qt module lie

Re: Fwd: Fwd: [PyKDE] Qt objects subclasses and __dict__ copies

2006-03-21 Thread Tina Isaksen
Daniele Varrazzo wrote: What version? AFAIK this was fixed with SIP 4.2 over a year ago. Whichever version is included in the debian package python-qt3 (3.13-4), which is the most recent stable version available for debian: http://packages.debian.org/stable/python/python-qt3 Debian