summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 06f5cf8..f415e40 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -312,3 +312,15 @@ def test():
import linecache
linecache.checkcache()
run(TESTCMD)
+
+# print help
+def help():
+ for dirname in sys.path:
+ fullname = os.path.join(dirname, 'pdb.doc')
+ if os.path.exists(fullname):
+ sts = os.system('${PAGER-more} '+fullname)
+ if sts: print '*** Pager exit status:', sts
+ break
+ else:
+ print 'Sorry, can\'t find the help file "pdb.doc"',
+ print 'along the Python search path'