Skip to content
  • David Gobbi's avatar
    Fix remaining py3k issues with vtk.tk module. · aa4e0d02
    David Gobbi authored
    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).
    
    2) 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 (i.e. so that it won't complain
    about trying to import "tkinter" on Python 2, just because it had a
    fallthrough on an attemp to import "Tkinter".
    aa4e0d02