C-h f equivalent

Mikael Schönenberg micke at strakt.com
Thu Mar 6 08:45:04 EST 2003


On Thu, 6 Mar 2003, Glyn Millington wrote:

> Now when I want to put something together in elisp, in Xemacs all I have
> to do is C-h f and then feed in the function name and I get the goods on
> a particular function. C-h v does the same for variables.  Is there
> anything quite as handy as this in python which will tell me about
> functions, built-in variable etc I've got the doc and can search 'em but
> is there a quick reference built in?

The function I believe you're looking for is help()

Example:

Python 2.2.2 (#3, Nov  7 2002, 18:04:12)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help(dir)
Help on built-in function dir:

dir(...)
    dir([object]) -> list of strings

    Return an alphabetized list of names comprising (some of) the
attributes
    of the given object, and of attributes reachable from it:

    No argument:  the names in the current scope.
    Module object:  the module attributes.
    Type or class object:  its attributes, and recursively the attributes
of
        its bases.
    Otherwise:  its attributes, its class's attributes, and recursively
the
        attributes of its class's base classes.

>>>

/micke






More information about the Python-list mailing list