Skip to content

Python 3 test fixes from Andrew with tweaks of my own.

David Gobbi requested to merge dgobbi/vtk:python-py3k-tests into master

Fix remaining py3k issues with vtk.tk module.

Two major changes: 1) the vtkLoadPythonTkWidgets utility module is now
imported explicitly as a relative module, necessitating absolute_import.
The alternative is to import it as vtk.tk.vtkLoadPythonTkWidgets, which
makes the tk module less mobile, in case someone wanted to incorporate it
or the vtk module itself into a larger package (e.g. what paraview does).

  1. I've explicitly added an "if" check for python3 before importing the
    tkinter module. This is done to ensure that an appropriate error is
    reported if the module fails to load.

Merge request reports