[PyKDE] [eric3] wannabe eric3 user...

2006-07-12 Thread Timothy Reaves
I'm trying to get this compiled & running on my machine, a G5 OS X 
10.4.7 machine.  I have python 2.4.3 install fine.


QT 3.3.6 MT is installed.
QScintilla 1.65 installed
sip 4.4.5 installed
PyQt 3.16 installed.

Eric 3.9.1: when I try to install this, I get the follwoing error:
dusty > sudo python install.py
Sorry, please install QScintilla and/or reinstall
PyQt with QScintilla support.
Error: Failure linking new module: 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/qtext.so: 
Library not loaded: libqscintilla.6.dylib
  Referenced from: 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/qtext.so

  Reason: image not found


When I look at qtext.so, I see this:
dusty > otool -L qtext.so
qtext.so:
/Library/Frameworks/Python.framework/Versions/2.4/Python 
(compatibility version 2.4.0, current version 2.4.0)
libqscintilla.6.dylib (compatibility version 6.0.0, current 
version 6.0.0)
libqt-mt.3.dylib (compatibility version 3.3.0, current version 
3.3.6)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, 
current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current 
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, 
current version 88.1.6)



	So it looks as if libqt & libqscintilla are being looked for in the 
current directory, instead of an absolute path.  Any ideas how that 
happened?



	QScintilla is installed, as is PyQt.  I'm not sure what information 
would be needed to help diagnose this.  Any assistance appreciated.


___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] static const member variables

2006-07-12 Thread Nigel Stewart

The problem we're having is that without a concept of constness
in Python, we have the risk of python-code changing A::zero,
A::one or QString::null.

>
Proper support for const has been on the TODO list for a long time - just 
haven't got around to it yet.


Thanks Phil, just checking if there was anything new that we
ought to know about...

Thanks,

Nigel Stewrat

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Modify init/dealloc on structs

2006-07-12 Thread Daniele Varrazzo

> i need to wrap C structures that require some initialization (they
> must be memsetted to 0) and careful freeing if C-owned (to free
> aggregate structures as well).



It's not very well documented but SIP allows you to specify constructors and
non-virtual destructors for C structs. Both allow %MethodCode.


Thank you very much: it seems to work. I had troubles with the sip
syntax but actually it's the same of c++ classes c'tor and d'tor.

Daniele

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Modify init/dealloc on structs

2006-07-12 Thread Phil Thompson
On Wednesday 12 July 2006 2:29 pm, Daniele Varrazzo wrote:
> Hello,
>
> i need to wrap C structures that require some initialization (they
> must be memsetted to 0) and careful freeing if C-owned (to free
> aggregate structures as well).
>
> Can %MethodCode be used to customize dealloc_ABC and init_ABC code for
> a wrapped ABC struct? How?
>
> Alternatively i could provide a /Factory/ function to correctly
> initialize an ABC instance, but then i'd like to hide ABC from he
> module interface and only expose createABC() to avoid the creation of
> uninitialized structures. Furthermore troubles remain on destruction
> (expose a destryABC?)
>
> What is the best approach to tackle this kind problem with SIP?

It's not very well documented but SIP allows you to specify constructors and 
non-virtual destructors for C structs. Both allow %MethodCode.

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[PyKDE] Modify init/dealloc on structs

2006-07-12 Thread Daniele Varrazzo

Hello,

i need to wrap C structures that require some initialization (they
must be memsetted to 0) and careful freeing if C-owned (to free
aggregate structures as well).

Can %MethodCode be used to customize dealloc_ABC and init_ABC code for
a wrapped ABC struct? How?

Alternatively i could provide a /Factory/ function to correctly
initialize an ABC instance, but then i'd like to hide ABC from he
module interface and only expose createABC() to avoid the creation of
uninitialized structures. Furthermore troubles remain on destruction
(expose a destryABC?)

What is the best approach to tackle this kind problem with SIP?

Thank you very much,

Daniele

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde