This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pydoc's usage should use basename
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: doko, loewis
Priority: normal Keywords: patch

Created on 2003-08-08 23:44 by doko, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (2)
msg44415 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2003-08-08 23:44
pydoc should output only the basename, not the full path.

+++ Lib/pydoc.py        2003-08-09 01:40:58.000000000 +0200
@@ -2090,7 +2090,7 @@
                 print value
 
     except (getopt.error, BadUsage):
-        cmd = sys.argv[0]
+        cmd = os.path.basename(sys.argv[0])
         print """pydoc - the Python documentation tool
 
 %s <name> ...
msg44416 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-31 13:05
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as pydoc.py 1.86.8.1 and 1.89
History
Date User Action Args
2022-04-10 16:10:33adminsetgithub: 39037
2003-08-08 23:44:35dokocreate