[vtk-developers] VTK Python and Tk [was: VTK Python Installation]

Sander Niemeijer niemeijer at science-and-technology.nl
Mon Aug 15 03:59:09 EDT 2005


>>> - or that (as has been suggested I think) a
>>> VTK_WRAP_PYTHON build of VTK should not be dependent on Tk if
>>> at all possible...
>
>     Brad> The vtkRenderingPythonTkWidgets library needs Tk but it
>     Brad> provides some nice tkinter helpers.  I agree this should not
>     Brad> be required though.  We should add an option like
>     Brad> "VTK_USE_PYTHON_TK" to select whether the Tk-dependent parts
>     Brad> are provided.  It would have to default to ON to preserve
>     Brad> behavior.
>
>     Brad> Any suggestions for a better name or another approach?
>
> We could build the tk widgets if the right Tcl/Tk paths are set and
> not present another option.  However, this will lead to problems with
> users not knowing that they even need to set the Tk paths.  OTOH,
> adding another option adds another option to choose from but makes it
> explicit.  I'll err on the side of "explicit is better than implicit".
> So I'll vote for a VTK_BUILD_PYTHON_TK_WIDGETS option.

I like the explicit option too (it allows for a simultaneous build of 
the Tcl/Tk wrappers and Tcl/Tk-free Python wrappers). Whether it is 
called VTK_USE_PYTHON_TK or VTK_BUILD_PYTHON_TK_WIDGETS does not really 
matter for me (although I have a slight preference for the former, 
since it is more upwards compatible in case we ever add some Tcl/Tk 
dependent code to the non-widget part of the Python wrappers).

Best regards,
Sander




More information about the vtk-developers mailing list