S.I.Reynolds at cs.bham.ac.uk
Tue Feb 22 21:12:21 CET 2000
Gerrit Holl wrote:
> You could write the help function like this:
> def help(obj):
> """help(obj) -> None
> Print the docstring of an object to sys.stdout.
> if hasattr(obj, "__doc__):
> print obj.__doc__
> print obj, "doesn't have a docstring"
If you want to use the function in interactive mode you'll need to place
it into your $HOME/.pythonrc.py file and make sure that the
PYTHONSTARTUP env. variable is set:
if (! $?PYTHONSTARTUP) then
setenv PYTHONSTARTUP $HOME/.pythonrc.py
More information about the Python-list