How to search help using python console

前端 未结 10 1338
长发绾君心
长发绾君心 2021-02-08 20:25

Is there any way to search for a particular package/function using keywords in the Python console?

For example, I may want to search \"pdf\" for pdf related tasks.

10条回答
  •  忘掉有多难
    2021-02-08 20:54

    In console type help(object):

    Python 2.6.2 (r262:71600, Apr 21 2009, 15:05:37) [MSC v.1500 32 bit (Intel)] on
    win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> help(dir)
    Help on built-in function dir in module __builtin__:
    
    dir(...)
        dir([object]) -> list of strings
    ....    
    

    Unfortunatelly there is no help for pdf:

    >>> help(pdf)
    Traceback (most recent call last):
      File "", line 1, in 
    NameError: name 'pdf' is not defined
    >>>
    

    As paffnucy said try searching internet (SO works wery well :)

    This site can be helpful as well: http://www.gotapi.com/python

提交回复
热议问题