I can't speak to legacy support, but there are several distributions with pre-built VTK and python wrappers:<br><br>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)<br>
<br>Python (x,y) <a href="http://www.pythonxy.com">www.pythonxy.com</a><br><br>DeVide <a href="http://code.google.com/p/devide/wiki/Downloads?tm=2">http://code.google.com/p/devide/wiki/Downloads?tm=2</a><br><br>
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.<br><br>-Isaiah<br><br><div class="gmail_quote">
On Mon, Jul 4, 2011 at 11:24 PM, Mike Toews <span dir="ltr"><<a href="mailto:mwtoews@gmail.com">mwtoews@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I need to read/manipulate legacy (v.3) VKT files in Python. I<br>
currently have Python 2.5, which was installed by ArcGIS. I tried<br>
PyVTK[1][2], which was simply to install from cmd.exe via setup.py (as<br>
it is pure Python--I don't have a compiler). But when I tried reading<br>
my v.3 VTK file, this exception was thrown:<br>
TypeError: File 'foo.vtk' is not VTK 2.0 format<br>
<br>
I understand there Python bindings are maintained as an add-on from<br>
the main VTK source tree. On a guest Linux server, I tried "import<br>
vtk", and I can successfully read the full structure of my test VTK<br>
file perfectly. However, I want this on my Windows machine since that<br>
is my primary computer with GIS, etc. I haven't found any Python<br>
bindings for Windows, and the Downloads page[3] basically says for<br>
"Python support ... you will have to compile VTK from source", which I<br>
have no interest in doing. The wiki appears to be severely out of<br>
date[4] (nearly 10 years old?), which is why I'm asking this mail<br>
list. Are there any unofficial Python bindings to read legacy VTK<br>
formats? Are there any future plans to provide Python support for<br>
Windows?<br>
<br>
Thanks,<br>
-Mike<br>
<br>
[1] <a href="http://cens.ioc.ee/projects/pyvtk/" target="_blank">http://cens.ioc.ee/projects/pyvtk/</a><br>
[2] <a href="http://pypi.python.org/pypi/PyVTK/" target="_blank">http://pypi.python.org/pypi/PyVTK/</a><br>
[3] <a href="http://www.vtk.org/VTK/resources/software.html" target="_blank">http://www.vtk.org/VTK/resources/software.html</a><br>
[4] <a href="http://www.vtk.org/Wiki/VTK/FAQ#Where_can_I_find_Python_2.x_binaries.3F" target="_blank">http://www.vtk.org/Wiki/VTK/FAQ#Where_can_I_find_Python_2.x_binaries.3F</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>