Movatterモバイル変換
[0]ホーム
[Python-Dev] Re: pydoc.py (show docs both inside and outside of Python)
Ka-Ping Yeeping@lfw.org
Thu, 11 Jan 2001 14:26:53 -0800 (PST)
On Thu, 11 Jan 2001, Martin v. Loewis wrote:>> However, robustness probably needs to be improved:Agreed.> Wasn't there even a proposal that>> >>> help>> should do something meaningful (by implementing __repr__)?There was. I am planning to incorporate Paul Prescod's mechanismfor doing this; i just didn't have time to throw in that featureyet, and wanted feedback on the man-like stuff first.My next two targets are: 1. Generating text from the HTML documentation files using Paul Prescod's stuff in onlinehelp.py. 2. Running a background HTTP server that produces its pages using htmldoc.py.Both are pieces we already have and only need to integrate; i justwanted to get at least a working candidate done first.Did using pydoc like "man" work okay for you?> >>> import string> >>> help(string)> Traceback (most recent call last):...> TypeError: arg is a built-in classMine doesn't do this for me. I think i may have left up an older versionof inspect.py by mistake. Try downloadinghttp://www.lfw.org/python/inspect.pyagain -- apologies for the hassle.> Also, the tools could use some command line options:>>martin@mira:~/pydoc > ./pydoc.py --help> Traceback (most recent call last):> File "./pydoc.py", line 190, in ?> opts[args[i][1:]] = args[i+1]> IndexError: list index out of range>> At a minimum, I propose -h, --help, -v, -V.Okay. There is usage help already; i just failed to make it sufficientlyrobust about deciding when to show it. skuld[1010]% pydoc /home/ping/bin/pydoc <name> ... Show documentation on something. <name> may be the name of a Python function, module, package, or a dotted reference to a class or function within a module or module in a package. /home/ping/bin/pydoc -k <keyword> Search for a keyword in the short descriptions of modules.-- ?!ng"If I have seen farther than others, it is because I was standing on areally big heap of midgets." -- K. Eric Drexler
[8]ページ先頭