1
# Author: Prabhu Ramachandran
3
# Copyright (c) 2004, Enthought, Inc.
4
""" A Traits-based wrapper for the Visualization Toolkit.
5
Part of the Mayavi project of the Enthought Tool Suite.
8
from os.path import exists, join, dirname, isdir
10
# The tvtk wrapper code is all typically inside one zip file. We try to
11
# find this file and put it in __path__ and then create the 'tvtk' module
12
# wrapper from that. If the ZIP file is extracted into a tvtk_classes
13
# directory the ZIP file is not used and the tvtk_classes directory is
14
# inserted into sys.path and the directory contents are used for the tvtk
15
# classes -- note that you must have the following structure
16
# tvtk_classes/tvtk_classes/__init__.py. This is handy for tools like
19
# We add the path to the local __path__ here, in the __init__, so that
20
# the unpickler can directly unpickle the TVTK classes.
22
_zip = join(dirname(__file__), 'tvtk_classes.zip')
23
tvtk_class_dir = join(dirname(__file__), 'tvtk_classes')
25
if exists(tvtk_class_dir) and isdir(tvtk_class_dir):
26
# Nothing to do, it will imported anyhow.