[vtkusers] vtkRenderWindowInteractor + Tkinter.Tk

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri Oct 18 15:09:28 EDT 2002


>>>>> "TS" == Theodore D Sternberg <tdsternberg at lbl.gov> writes:

    TS> The problem with doing this in Python is that (as far as I
    TS> know) you are forced to call both
    TS> vtkRenderWindowInteractor.Start() and Tkinter.Tk.mainloop() --
    TS> and either one prevents the Python interpreter from executing
    TS> any subsequent lines in the .py file.

    TS> I've tried spinning threads, but the vtkRenderWindowInteractor
    TS> seems to starve all other threads.

Yes, that is what happens.  The only easy way I can think of doing
this is to use the vtkTkRenderWidget.

    TS> I am trying to avoid vtkTkRenderWidget.  It dumps core on a
    TS> lot of systems (when using Python, and I've tried the tricks
    TS> -- setting VTK_TK_WIDGET_PATH, copying vtkTkRenderWidget into
    TS> /usr/lib, configuring --with-shared).

Maybe if you give us more details on this problem, it could be fixed?

Recently, Andy added a vtkpython executable that solves some of the
problems with VTK and Tkinter on non-Linux *nix platforms.  IIRC the
biggest problems arise on systems with non-gcc compilers.  Maybe you
should try with the vtkpython executable instead of vanilla Python.

cheers,
prabhu



More information about the vtkusers mailing list