[PySide] PySide - Qt5 - Swig

Erik Janssens Erik.Janssens at conceptive.be
Sun Jan 13 20:39:03 CET 2013


I'd like to point out that whatever tool is chosen to generate Qt bindings
for Python, there should be a document describing how the tool will
handle the interaction of :

- Python garbage collection
- Qt parent-child relationschip
- Signal-slot interaction between objects
- Python GIL

not having such a document available makes it almost impossible
for other developers to 'jump' into the code and understand what is
happening.  and not thinking this through before starting might
lead to fatal flaws and might make it impossible to finish the binding
correctly.

I believe SIP was developed for exactly these issues.

this might however be a good time to evaluate all options...

On Sun, Jan 13, 2013 at 2:56 PM, anatoly techtonik <techtonik at gmail.com>wrote:

> On Sun, Jan 13, 2013 at 4:25 PM, Fabien Castan <fabcastan at gmail.com>wrote:
>
>>
>>>  I personally like the idea of using SWIG to build Qt bindings. SWIG is
>>>>> the only tool I have ever used to interface C++ and Python, and it seemed
>>>>> fine. All of the alternatives to SWIG seemed worse.
>>>>> For those who don't know, PyQt uses SIP. SIP is similar to SWIG in
>>>>> many ways.
>>>>
>>>> Compared to PyQt, our binding creates bigger binaries, but it may be
>>>> better with hand written rules... And we could discuss with SWIG guys on
>>>> that point.
>>>>
>>>
>>> "may be better" is a bad argument. Historically PySide used Boost, it
>>> generated a lot of garbage too, and that's why Shiboken was born (correct
>>> me if I wrong). The only problem with Shiboken maintainability is that it
>>> is written in C++ and most PySide users with primarily Python background.
>>> SWIG doesn't tackle this core flaw at all and may become an additional
>>> hurdle that will bury the project even more.
>>>
>>> The good solution (tm) is not to rewrite Shiboken from scratch, but find
>>> a way to gradually move the logic out of it into Python.
>>>
>>
>> I don't want to hurt anybody.
>>
>
> =) That would be hard.
>
>
>> I just want to find a way to see a Qt5 binding soon. If it's with
>> Shiboken it's fine to me... but I can't help on that.
>> I'm personally not interested to create yet another binding tool. I just
>> want Qt5 available in python.
>>
>> Swig has become one of the most popular binding tool. It's really
>> accessible for all people to create rules. This could help to extend the
>> community around PySide. For example, I could help and some people around
>> me too.
>> IMHO, it's always the same problem in the open source world... the
>> difficulty for communities to work together. There is always a lot of open
>> source software to do same thing, but rarely a good one inside this
>> profusion.
>>
>> Are people from Shiboken not interested to work on Swig? Why?
>> I see the reason to eliminate boost python. Is there a reason to
>> eliminate Swig?
>>
>
> I guess the same reason applies.
>
> http://web.archive.org/web/20120311172636/http://www.pyside.org/docs/shiboken/faq.html
>
> One of the reasons to switch to Python is to continue generating docs like
> that. SWIG will never be able to generate something like this, and it would
> be nice to make generated HTML available again. GitHub or Google Code
> should do this.
>
> Another reason. You said you're able to generate Swig rules from the .xml
> files of Shiboken. Can you do the reverse?
>
>  it would be pity to throw away all the hard work of developers on
>>> shiboken.
>>>
>>
>> No, it could be a great opportunity to bring this expertise to SWIG! And
>> make the world wonderful. ;)
>> But I understand the history of SWIG with binaries sizes. I don't have
>> the project with me, but I will check that and send you that information in
>> detail.
>>
>
> Why not to bring expertise to Boost then? You again ignore the Py. side of
> the arguments. In Python world ctypes is way more popular, because it
> doesn't require compilation and binary blobs. I'd look into CFFI if you
> really want to move new technology. We all want Qt5 in Python, but in
> pythonic ways.
>
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130113/ffd1a0d5/attachment.html>


More information about the PySide mailing list