-
- Downloads
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). 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".
Showing
- Filters/Sources/Testing/Python/squadViewer.py 27 additions, 21 deletionsFilters/Sources/Testing/Python/squadViewer.py
- Rendering/Tk/Testing/Python/TestTextActor3D.py 33 additions, 33 deletionsRendering/Tk/Testing/Python/TestTextActor3D.py
- Rendering/Tk/Testing/Python/TestTkRenderWidget.py 6 additions, 6 deletionsRendering/Tk/Testing/Python/TestTkRenderWidget.py
- Rendering/Tk/Testing/Python/TestTkRenderWindowInteractor.py 8 additions, 6 deletionsRendering/Tk/Testing/Python/TestTkRenderWindowInteractor.py
- Rendering/Tk/Testing/Python/cursor3D.py 32 additions, 32 deletionsRendering/Tk/Testing/Python/cursor3D.py
- Wrapping/Python/vtk/tk/vtkLoadPythonTkWidgets.py 7 additions, 3 deletionsWrapping/Python/vtk/tk/vtkLoadPythonTkWidgets.py
- Wrapping/Python/vtk/tk/vtkTkImageViewerWidget.py 10 additions, 8 deletionsWrapping/Python/vtk/tk/vtkTkImageViewerWidget.py
- Wrapping/Python/vtk/tk/vtkTkPhotoImage.py 10 additions, 7 deletionsWrapping/Python/vtk/tk/vtkTkPhotoImage.py
- Wrapping/Python/vtk/tk/vtkTkRenderWidget.py 10 additions, 10 deletionsWrapping/Python/vtk/tk/vtkTkRenderWidget.py
- Wrapping/Python/vtk/tk/vtkTkRenderWindowInteractor.py 10 additions, 9 deletionsWrapping/Python/vtk/tk/vtkTkRenderWindowInteractor.py
Loading
Please register or sign in to comment