命令行方式

  • 执行 python 方法。
  • 引入需要查看的包名
  • 使用help函数查看
  1. imjcw@imjcwPC:~$ python
  2. Python 2.7.15+ (default, Nov 27 2018, 23:36:35)
  3. [GCC 7.3.0] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> import redis
  6. >>> help(redis)

编写文件执行方式

  1. # -*- coding: utf-8 -*-
  2. import redis
  3. help(redis)