where is help file?

Martin Blume mblume at socha.net
Fri Sep 14 12:20:12 EDT 2007


"Carsten Haese" schrieb
> > new to Fedora7, typed python in interactive interpreter, then
help().
> > Then modules to get a list of modules.  Then module name to get
info
> > on a module but no help file.  What is the help file name?
> > Is there an environmental variable I have to set?
>
> There is no help file, and no environment variable. The help text
is
> stored directly inside each module and function that supplies a
help
> text. Observe:
>
> >>> def f(x):
> ...   "Calculate the square of x."
> ...   return x**x
> ...
> >>> help(f)
> Help on function f in module __main__:
>
> f(x)
>     Calculate the square of x.
> (END)
>
> Providing such a help text is optional, but all standard library
modules
> do provide help as far as I know. Consequently, the fact that you
have a
> module that doesn't provide a help text seems to indicate that
it's not
> a standard library module. What's the name of the module you're
trying
> to get help on?
>
> Hope this helps (no pun intended),
>
AFAIK you have to import the module first, before you can get help
on that module.

HTH
Martin




More information about the Python-list mailing list