[vtkusers] Running VTK 4.2 with Python 2.3 & GUI preferences

Karl Garsha garsha at itg.uiuc.edu
Mon Feb 23 12:46:48 EST 2004


As far as the first question goes, you will probably have to wrap the 
VTK libraries using Python2.3 for things to work in the context of the 
Python 2.3 byte code interpreter.  This probably means rebuilding with 
the CMakeCache.txt values pointed to the Python2.3 directories.  I'm not 
sure what platform you are on, so it is difficult to go over specifics, 
but if it is a windows environment, you can just download the Enthought 
Edition Python2.3 distribution and you'll be all set with Tkinter, 
wxWindows, MayaVi, and VTK and various other useful modules pre-installed.
    As far as GUI choices go, wxWindows is tough to beat.  Especially if 
you want your program to run on various platforms without the added 
complexity of running an X11 windowserver on top of Windows or OS X.  
There are more prebuilt VTK viewer widgets available for Tkinter, but 
running a Python bytecode interpreter which signals a TCL interpreter on 
top of a second window server (in OS X) with it's own window manager 
just doesn't seem very efficient to me.  I've tried to work with pyFOX, 
but this cross platform gui toolkit wouldn't build on OS X or Win32.  I 
haven't messed with FLTK, and wxWindows just works, which is what I 
need.  If you don't want to use the native gui widgets,  wx has wxGTK 
and GTK is available for Win32 and MacOS X carbon.  wxWindows even has 
light 'Universal' widgets of its own for minimal X11 installations and a 
gui api for MS Windows OS handhelds.  I keep coming back to wxPython 
because it works across platforms without much fuss and it is reasonably 
responsive.
    I would steer clear of Boa Constructor until some of the bugs are 
worked out.  On OS X it just crashes randomly and has numerous wierd 
bugs; I think there are some issues on Linux as well.  The 'pyShell' 
interpreter with autocompletion that comes with wxWindows and the 
'pyAlaCarte' editor can be used effectively to write VTK python 
programs.  For a really nice IDE solution I've found wxDesigner and 
WingIDE to be a really nice combination.  They are both proprietary 
solutions, but they are affordable, especially for persons associated 
with academic institutions, and they quite helpful.  wxDesigner is a GUI 
designer that can output source code in a number of languages including 
Python, and WingIDE is a heavy duty IDE with powerful debugging and 
autocompletion and it can be configured to work in synergy with 
wxDesigner.  Both programs work on Windows, Linux and OS X (and probably 
a number of other operating systems). 
-Karl G.

Wesley Brooks wrote:

> Dear Users
>
> I have only recently started programming in order to over come some 
> problems with areas in my research so please keep replies at an entry 
> level!
>
> Some one has installed VTK 4.2 on my machine and is now running fine 
> with python 2.1. I also have python 2.3 running on this machine but it 
> will not run the same programs saying there is no module named vtk. 
> How do I get python 2.3 to talk to VTK?
>
> On another note I'm starting to investigate building a GUI for what I 
> have done so far. I have seen  a few options like Tkinter and 
> wxPython, and using a GUI builder using wxPython such as Boa 
> Constrictor. What are the recommendations on this and are they all 
> compatible with VTK?
>
> Yours Faithfully,
>
> Wesley Brooks
>
>  
>
>
>
>
> ------------------------------------------------------------------------
> Half price modem, FREE connection and one month FREE - click here to 
> sign up to BT Broadband. <http://g.msn.com/8HMBENUK/2755??PS=> 
> _______________________________________________ This is the private 
> VTK discussion list. Please keep messages on-topic. Check the FAQ at: 
> Follow this link to subscribe/unsubscribe: 
> http://www.vtk.org/mailman/listinfo/vtkusers 


-- 
Karl Garsha
Light Microscopy Specialist
Imaging Technology Group
Beckman Institute for Advanced Science and Technology
University of Illinois at Urbana-Champaign
405 North Mathews Avenue
Urbana, IL 61801
Office: B650J
Phone: 217.244.6292
Fax: 217.244.6219
Mobile: 217.390.1874
www.itg.uiuc.edu





More information about the vtkusers mailing list