~ubuntu-branches/ubuntu/precise/mayavi2/precise

« back to all changes in this revision

Viewing changes to enthought/tvtk/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-09 01:18:36 UTC
  • mfrom: (1.1.10 upstream) (2.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110709011836-fha21zirlgkqh92s
Tags: 4.0.0-1
* New upstream release
* debian/control:
  - Bump Standards-Version to 3.9.2
  - Set X-Python-Version: 2.6, fixes FTBFS (Closes: #625148)
  - Update Depends
* Update debian/watch file
* Cleanup debian/rules file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Author: Prabhu Ramachandran
2
 
# License: BSD style
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.
6
 
"""
7
 
 
8
 
from os.path import exists, join, dirname, isdir
9
 
 
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
17
 
# pydev (Eclipse). 
18
 
 
19
 
# We add the path to the local __path__ here, in the __init__, so that
20
 
# the unpickler can directly unpickle the TVTK classes.
21
 
 
22
 
_zip = join(dirname(__file__), 'tvtk_classes.zip')
23
 
tvtk_class_dir = join(dirname(__file__), 'tvtk_classes')
24
 
 
25
 
if exists(tvtk_class_dir) and isdir(tvtk_class_dir):
26
 
    # Nothing to do, it will imported anyhow.
27
 
    pass
28
 
elif exists(_zip):
29
 
    __path__.append(_zip)
30
 
 
31