summaryrefslogtreecommitdiff
path: root/sphinx/apidoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r--sphinx/apidoc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py
index 1238693c8..8e2d88ef7 100644
--- a/sphinx/apidoc.py
+++ b/sphinx/apidoc.py
@@ -383,3 +383,7 @@ Note: By default this script will not overwrite already created files.""")
qs.generate(d, silent=True, overwrite=opts.force)
elif not opts.notoc:
create_modules_toc_file(modules, opts)
+
+# So program can be started with "python -m sphinx.apidoc ..."
+if __name__ == "__main__":
+ main()