File: __init__.py

package info (click to toggle)
mayavi 1.5-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,172 kB
  • ctags: 2,002
  • sloc: python: 17,938; makefile: 53; sh: 27
file content (30 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This file makes this directory a Python package.
# Base

import sys, os, string

# print __path__
my_name = os.path.basename (__path__[0])

# hacks to allow local names and prevents unnecessary reloading of
# modules.

# First make Common accessible.
for mod_name in ('mayavi.Common', ):
    if sys.modules.has_key (mod_name):
        local = string.replace (mod_name, 'mayavi', 'mayavi.' + my_name)
        sys.modules[local] = sys.modules[mod_name]

# needed by the LutHandler
import Objects

# now import Misc.LutHandler since we need it here.
if sys.modules.has_key ('mayavi') and not \
   sys.modules.has_key ('mayavi.Misc.LutHandler'):
    import mayavi.Misc.LutHandler

# Make Misc names local.
for mod_name in ('mayavi.Misc.LutHandler', 'mayavi.Misc'):
    if sys.modules.has_key (mod_name):
        local = string.replace (mod_name, 'mayavi', 'mayavi.' + my_name)
        sys.modules[local] = sys.modules[mod_name]