diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2005-10-14 15:31:13 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2005-10-14 15:31:13 +0000 |
commit | f56b5b052b4d7f2ea72699dcd0ee558d3cc9bbd4 (patch) | |
tree | d00ce0b105a5b00cd9c843844ebf62fe8edc7d27 /scipy/_import_tools.py | |
parent | 58dbd7af7f7643edeecb474cdaed6eb07b3d7847 (diff) | |
download | numpy-f56b5b052b4d7f2ea72699dcd0ee558d3cc9bbd4.tar.gz |
Initial hooks for package imports.
Diffstat (limited to 'scipy/_import_tools.py')
-rw-r--r-- | scipy/_import_tools.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scipy/_import_tools.py b/scipy/_import_tools.py new file mode 100644 index 000000000..a82944877 --- /dev/null +++ b/scipy/_import_tools.py @@ -0,0 +1,18 @@ + +import os +import imp +from glob import glob + +def import_packages(rootpath): + """ Import packages in the current directory that implement + info.py. See DEVELOPERS.txt for more info. + """ + for info_file in glob(os.path.join(rootpath,'*','info.py')): + package_name = os.path.basename(os.path.dirname(info_file)) + print info_file,package_name + continue + try: + info_module = imp.load_module() + except Exception,msg: + print msg + info_module = None |