diff options
author | Pauli Virtanen <pav@iki.fi> | 2008-08-27 21:49:40 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2008-08-27 21:49:40 +0000 |
commit | c84e0c0279747c6023207876838106aef2dbbc6d (patch) | |
tree | 00949f1e7f40d1652557eee2d520da31b4b722eb /numpy | |
parent | da4bbe9a303e53a6e508d6b3ba65636f0781cf32 (diff) | |
download | numpy-c84e0c0279747c6023207876838106aef2dbbc6d.tar.gz |
Import documentation topic modules when numpy.doc is imported, so that they are easier to use. Add instructions how to view each topic.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/doc/__init__.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/numpy/doc/__init__.py b/numpy/doc/__init__.py index 8664ea04d..44eb42441 100644 --- a/numpy/doc/__init__.py +++ b/numpy/doc/__init__.py @@ -6,7 +6,22 @@ __all__ = [f[:-3] for f in os.listdir(ref_dir) if f.endswith('.py') and not f.startswith('__')] __all__.sort() -__doc__ = 'The following topics are available:\n' + \ - '\n - '.join([''] + __all__) +for f in __all__: + __import__(__name__ + '.' + f) + +del f, ref_dir + +__doc__ = """\ +Topical documentation +===================== + +The following topics are available: +%s + +You can view them by + +>>> help(doc.TOPIC) + +""" % '\n- '.join([''] + __all__) __all__.extend(['__doc__']) |