diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-01-05 10:40:20 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-01-05 10:40:20 +0000 |
commit | cec9a2ee40ef84dab429e71825ea9c4c9765aa40 (patch) | |
tree | 835e03570e5de29b69f6ce1493ead2e7031905e7 /numpy/__init__.py | |
parent | 8b1e2f929fdfb79e0a446a1fb7bec33a799d492b (diff) | |
download | numpy-cec9a2ee40ef84dab429e71825ea9c4c9765aa40.tar.gz |
Cleaning up __all__ list and numpy namespace.
Diffstat (limited to 'numpy/__init__.py')
-rw-r--r-- | numpy/__init__.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index 706959e90..107afcd00 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -16,8 +16,9 @@ Available subpackages --------------------- """ -import os, sys -NUMPY_IMPORT_VERBOSE = int(os.environ.get('NUMPY_IMPORT_VERBOSE','0')) +import os as _os +import sys as _sys +NUMPY_IMPORT_VERBOSE = int(_os.environ.get('NUMPY_IMPORT_VERBOSE','0')) try: from __config__ import show as show_config @@ -25,12 +26,13 @@ except ImportError: show_config = None try: - import pkg_resources # activate namespace packages (manipulates __path__) + import pkg_resources as _pk # activate namespace packages (manipulates __path__) + del _pk except ImportError: pass if show_config is None: - print >> sys.stderr, 'Running from numpy source directory.' + print >> _sys.stderr, 'Running from numpy source directory.' else: from version import version as __version__ from testing import ScipyTest @@ -38,6 +40,11 @@ else: from lib import * from dft import fft, ifft from random import rand, randn + + __all__ = ['ScipyTest','fft','ifft','rand','randn'] + __all__ += core.__all__ + __all__ += lib.__all__ + __all__ = filter(lambda s:not s.startswith('_'),dir()) test = ScipyTest('numpy').test @@ -45,3 +52,5 @@ else: import add_newdocs # TODO: Fix __doc__ + +del _os, _sys |