[vtk-developers] Python wrapping of namespaces

David Gobbi david.gobbi at gmail.com
Wed Feb 10 15:19:01 EST 2016


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/255111e1/attachment.html>


More information about the vtk-developers mailing list