[vtk-developers] Adding PySide compatibility to python binding
HadiM
marelo64 at gmail.com
Thu May 12 00:40:26 EDT 2011
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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-PySide-compatibility-python-binding.patch
Type: application/octet-stream
Size: 931 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110512/93855be3/attachment-0001.obj>
More information about the vtk-developers
mailing list