Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Getting started with pyvtk

Reply
Thread Tools

Re: Getting started with pyvtk

 
 
Robert Kern
Guest
Posts: n/a
 
      05-01-2008
Peter Pearson wrote:
> I'm trying to get started with pyvtk, the Python interface
> to the Visualization Toolkit, but there's obviously
> something important that I haven't figured out after an
> embarrassingly long morning of googling around. When I run
> sample pyvtk code (example1.py, from
> http://cens.ioc.ee/cgi-bin/viewcvs.c...s/example1.py),
> nothing graphical happens, but some text files appear named
> example1.vtk and example1b.vtk. Guessing that I need to
> feed one of these to vtk, I tried "vtk <example1.vtk" and
> "vtk example1.vtk", but those result in (different) error
> messages that I think mean example1.vtk is not the language
> that vtk expects. Simply running "vtk" (apparently 4.0)
> gets a prompt that has no help command, and "man vtk" just
> tells me it's like "wish", and "man wish" doesn't address
> what to do with a vtk file.
>
> What key piece am I missing?


pyvtk is not the Python interface to VTK. It is for the creation of VTK files.
The vtk(1) command is a Tcl shell with the VTK libraries loaded (I believe).
Read the VTK documentation for information on the Tcl interface if you really
want to use it. The Python interface is also included in the VTK sources,
although it might not have been built on your machine. You have to enable it
when you build VTK itself. The Python interface is essentially the same as the
C++ interface. There are Python examples in the VTK source tree.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

 
Reply With Quote
 
 
 
 
Paul Melis
Guest
Posts: n/a
 
      05-02-2008
Peter Pearson wrote:
> On Thu, 01 May 2008 16:45:51 -0500, Robert Kern <(E-Mail Removed)> wrote:
>> pyvtk is not the Python interface to VTK. It is for the
>> creation of VTK files. The vtk(1) command is a Tcl shell
>> with the VTK libraries loaded (I believe). Read the VTK
>> documentation for information on the Tcl interface if you
>> really want to use it.

>
> You're right: I don't really want to use it.
>
>> The Python interface is also included in the VTK sources,
>> although it might not have been built on your machine. You
>> have to enable it when you build VTK itself. The Python
>> interface is essentially the same as the C++
>> interface. There are Python examples in the VTK source
>> tree.

>
> That's the ticket: I don't want to "import pyvtk", I
> want to "import vtk" and ape /usr/share/vtk/.../*.py.
>
> Thanks.


I'm not sure you've been helped so far as you seem to already understand
about pyvtk not being the official VTK bindings

So, what would you like to know?

Paul

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble with pyvtk LokiDawg Python 3 05-21-2007 07:24 AM
if a variable is started inside a closure, can it ever be redeclared and started over, outside of the original function? Jake Barnes Javascript 2 02-15-2006 03:32 AM
Getting Started Bill McCarty Firefox 4 08-12-2005 07:02 PM
Need help getting started !!! Ted R VHDL 3 10-23-2004 02:40 PM
Getting started with Altera IP Core ALuPin VHDL 0 09-21-2004 01:37 PM



Advertisments