[vtkusers] Python bindings for Windows

Isaiah Norton isaiah.norton at gmail.com
Tue Jul 5 00:30:09 EDT 2011


I can't speak to legacy support, but there are several distributions with
pre-built VTK and python wrappers:

Enthought Python Distribution (note: they have a 2nd wrapper layer called
tvtk with more pythonic syntax, traits support, and some nice NumPy glue --
but you can use pure wrapped VTK if you want)

Python (x,y)    www.pythonxy.com

DeVide           http://code.google.com/p/devide/wiki/Downloads?tm=2

3D Slicer comes with Python-wrapped VTK, and you can run python stand-alone
using the --launch argument if you want. I believe Paraview also comes with
wrapped VTK and a python shell.

-Isaiah

On Mon, Jul 4, 2011 at 11:24 PM, Mike Toews <mwtoews at gmail.com> wrote:

> Hi,
>
> I need to read/manipulate legacy (v.3) VKT files in Python. I
> currently have Python 2.5, which was installed by ArcGIS. I tried
> PyVTK[1][2], which was simply to install from cmd.exe via setup.py (as
> it is pure Python--I don't have a compiler). But when I tried reading
> my v.3 VTK file, this exception was thrown:
> TypeError: File 'foo.vtk' is not VTK 2.0 format
>
> I understand there Python bindings are maintained as an add-on from
> the main VTK source tree. On a guest Linux server, I tried "import
> vtk", and I can successfully read the full structure of my test VTK
> file perfectly. However, I want this on my Windows machine since that
> is my primary computer with GIS, etc. I haven't found any Python
> bindings for Windows, and the Downloads page[3] basically says for
> "Python support ... you will have to compile VTK from source", which I
> have no interest in doing. The wiki appears to be severely out of
> date[4] (nearly 10 years old?), which is why I'm asking this mail
> list. Are there any unofficial Python bindings to read legacy VTK
> formats? Are there any future plans to provide Python support for
> Windows?
>
> Thanks,
> -Mike
>
> [1] http://cens.ioc.ee/projects/pyvtk/
> [2] http://pypi.python.org/pypi/PyVTK/
> [3] http://www.vtk.org/VTK/resources/software.html
> [4]
> http://www.vtk.org/Wiki/VTK/FAQ#Where_can_I_find_Python_2.x_binaries.3F
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110705/5137fb4f/attachment.htm>


More information about the vtkusers mailing list