[vtk-developers] Python wrapping of namespaces
David Gobbi
david.gobbi at gmail.com
Wed Feb 10 16:15:56 EST 2016
TFM for the python wrappers is here, though I'm sure it doesn't have all
the detail that you desire:
https://raw.githubusercontent.com/Kitware/VTK/master/Wrapping/Python/README_WRAP.txt
As much as we would love the wrapping to be perfect, it often depends on
heuristics, fallbacks, and other messiness. We test many of the wrapper
features insofar as they are needed to wrap VTK itself, so of course we
advise people who want to use the wrappers on their code to keep their
headers formatted much the same as VTK's own.
- David
On Wed, Feb 10, 2016 at 1:39 PM, Adam Rankin <arankin at robarts.ca> wrote:
> OK good to know.
>
> My question was meant as more broad in scope. Basically, what features
> depend on the vtk prefix?
>
> I am happy to rtfm if anyone would point me towards the relevant docs.
>
> Adam
> On Feb 10, 2016 3:19 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> You mean wrt wrapping? Try it and see ;-)
>
> It might work, but then again, it might not. I advise that you keep the
> prefix. If your classes are a singular exceptional case that doesn't use
> the prefix, then you might be the one who has to do the maintenance :)
>
> - David
>
>
> On Wed, Feb 10, 2016 at 1:11 PM, Adam Rankin <arankin at robarts.ca> wrote:
>
>> Last but not least, is the prefix ‘vtk’ still required for classes that
>> derive from a vtk class?
>>
>>
>>
>> Cheers,
>>
>> Adam
>>
>>
>>
>> *From:* David Gobbi [mailto:david.gobbi at gmail.com <david.gobbi at gmail.com>]
>>
>> *Sent:* Wednesday, February 10, 2016 1:17 PM
>> *To:* Adam Rankin <arankin at robarts.ca>
>> *Cc:* vtk-developers at vtk.org
>> *Subject:* Re: [vtk-developers] Python wrapping of namespaces
>>
>>
>>
>> Hi Adam,
>>
>>
>>
>> So PLUS is being used at Robarts now! That's nice, big parts of PLUS
>> were built on top of code that was originally developed at Robarts. Long
>> live open source!
>>
>>
>>
>> The quick answer is, no, you cannot wrap classes within a namespace. The
>> VTK python wrappers only allow namespaces to be used for enum constants.
>>
>>
>>
>> I started working on a solution to this back in 2013, it isn't an easy
>> fix because all the work on the wrappers so far has assumed that everything
>> exists in a single flat namespace. Now of course I would love to complete
>> what I started, but like many of my free-time projects, I have no timeline
>> for when it might be done.
>>
>>
>>
>> - David
>>
>>
>>
>>
>>
>> On Wed, Feb 10, 2016 at 9:57 AM, Adam Rankin <arankin at robarts.ca> wrote:
>>
>> Hello all,
>>
>>
>>
>> I am a developer with the PLUS library, and we are having a discussion
>> with regards to class name cleanup/unification. We brought up moving
>> classes into a namespace, but wanted to keep the option of wrapping the
>> library in Python.
>>
>>
>>
>> My colleague mentioned that vtk objects in namespaces were not wrappable
>> in the past, and I was wondering if it is now possible to wrap namespaced
>> classes in python?
>>
>>
>>
>> Cheers,
>>
>> Adam
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160210/242f032f/attachment-0001.html>
More information about the vtk-developers
mailing list