[vtk-developers] Adding PySide compatibility to python binding

David Gobbi david.gobbi at gmail.com
Thu May 12 15:31:03 EDT 2011


Dave Partyka has merged it, so it will be in the 5.8 release.

This is still just the tip of the iceberg as far as VTK support for
PySide goes... the wrapping of all the classes in VTK/GUISupport/Qt
will also have to be switched over from sip to PySide eventually.

 - David


On Wed, May 11, 2011 at 11:38 PM, HadiM <marelo64 at gmail.com> wrote:
> Oops, sorry for the mistake :-D
>
> Here you have the right patch (I hope) :-D
>
> Cheers,
>
> --
> Hadrien Mary
>
>
>
> On Thu, May 12, 2011 at 3:34 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>> I looked at your new patch and I think it has a typo... did you test it?
>>
>>  - David
>>
>>
>> On Wed, May 11, 2011 at 10:40 PM, HadiM <marelo64 at gmail.com> wrote:
>>> Here you are the new patch. This new way is much cleaner :-).
>>>
>>> Hope it will be helpful.
>>>
>>> --
>>> Hadrien Mary
>>>
>>>
>>>
>>> On Thu, May 12, 2011 at 1:06 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>>> Hi Hadrien,
>>>>
>>>> The way the try/except is written, it will always complain about not
>>>> finding PySide even if the user expected it to be looking for PyQt.
>>>> Can you modify the patch so that it will report the error as
>>>> "ImportError: Cannot load either PyQt or PySide"?  This can be
>>>> done by adding another try-except around the second import and
>>>> then re-throwing the exception (there's probably a tidier way to do it,
>>>> but the main thing is to make the error less confusing).
>>>>
>>>>  - David
>>>>
>>>>
>>>> On Wed, May 11, 2011 at 7:26 PM, HadiM <marelo64 at gmail.com> wrote:
>>>>> Hi all,
>>>>>
>>>>> I would like to notice you than VTK python binding works very well
>>>>> with PySide (http://www.pyside.org/). Unfortunately, VTK binding try
>>>>> only to import PyQt in
>>>>> ./Wrapping/Python/vtk/qt4/QVTKRenderWindowInteractor.py.
>>>>>
>>>>> So I made a little patch, which when PyQt module import failed, it's
>>>>> try to import PySide module. It's probably not very clean to do it
>>>>> that way but it works... If you dont want to integrate this patch in
>>>>> next release, do you know when the PySide compatibility is planned ?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> --
>>>>> Hadrien Mary



More information about the vtk-developers mailing list