1. 查看帮助,我们可以在python命令行交互环境下用 help函数,比如:

查看 math 模块:

>>> help('math')
Help on built-in module math:

NAME
math

DESCRIPTION
This module is always available. It provides access to the
mathematical functions defined by the C standard.

FUNCTIONS
acos(...)
acos(x)

Return the arc cosine (measured in radians) of x.

acosh(...)
acosh(x)

Return the inverse hyperbolic cosine of x.

asin(...)
asin(x)

Return the arc sine (measured in radians) of x.

asinh(...)
asinh(x)

Return the inverse hyperbolic sine of x.

atan(...)
atan(x)

Return the arc tangent (measured in radians) of x.

atan2(...)
atan2(y, x)

Return the arc tangent (measured in radians) of y/x.
Unlike atan(y/x), the signs of both x and y are considered.

atanh(...)
atanh(x)

Return the inverse hyperbolic tangent of x.

ceil(...)
ceil(x)

Return the ceiling of x as an Integral.
This is the smallest integer >= x.

-- More --

2. 或者用pydoc.py查看,比如:

C:\Users\dell\AppData\Local\Programs\Python\Python35\Lib>python pydoc.py math
Help on built-in module math:

NAME
math

DESCRIPTION
This module is always available. It provides access to the
mathematical functions defined by the C standard.

FUNCTIONS
acos(...)
acos(x)

Return the arc cosine (measured in radians) of x.

acosh(...)
acosh(x)

Return the inverse hyperbolic cosine of x.

asin(...)
asin(x)

Return the arc sine (measured in radians) of x.

asinh(...)
asinh(x)

-- More --

3. 或者可以利用pydoc.py生成html帮助文档:

比如在端口8000:

C:\Users\dell\AppData\Local\Programs\Python\Python35\Lib>python pydoc.py -p 8000
Server ready at http://localhost:8000/
Server commands: [b]rowser, [q]uit

然后就可以用浏览器打开 http://localhost:8000/ 看到帮助文档

server> quit
Server commands: [b]rowser, [q]uit
server> uit
Server commands: [b]rowser, [q]uit
server> q
Server stopped

4. 也可以生成一个Html页面, 通过 -w 参数:

C:\Users\dell\AppData\Local\Programs\Python\Python35\Lib>python pydoc.py -w math
wrote math.html

然后就可以在C:\Users\dell\AppData\Local\Programs\Python\Python35\Lib 下看到 math.html

C:\Users\dell\AppData\Local\Programs\Python\Python35\Lib\math.html

Python pydoc.py的更多相关文章

  1. python调用py中rar的路径问题。

    1.python调用py,在py中的os.getcwd()获取的不是py的路径,可以通过os.path.split(os.path.realpath(__file__))[0]来获取py的路径. 2. ...

  2. python gettitle.py

    #!/usr/bin/env python # coding=utf-8 import threading import requests import Queue import sys import ...

  3. django 1.7之后python manage.py syncdb没有了

    在命令行输入python manage.py createsuperuser按照提示输入即可记得先初始化表. django>1.7 python manage.py makemigrations ...

  4. Python安装mysql-python错误提示python setup.py egg_info

    做python项目,需要用到mysql,一般用python-mysql,安装时遇到错误提示如下: Command "python setup.py egg_info" failed ...

  5. python __init__.py用途

    转自http://www.cnpythoner.com/post/2.html Python中的Module是比较重要的概念.常见的情况是,事先写好一个.py文 件,在另一个文件中需要import时, ...

  6. python setup.py uninstall

    I have installed a python package with python setup.py install How do I uninstall it? ============== ...

  7. python 运行python manege.py runserver时报错:“no module named djangorestframework” 的解决方案

    python 运行python manege.py runserver时报错:“no module named djangorestframework” 的解决方案 importerror:no mo ...

  8. Python Web.py

    安装Web.py root@bt:~# sudo pip install web.py Downloading/unpacking web.py Downloading web.py-0.37.tar ...

  9. python __init__.py

    python中的Module是比较重要的概念.常见的情况是,事先写好一个.py文 件,在另一个文件中需要import时,将事先写好的.py文件拷贝 到当前目录,或者是在sys.path中增加事先写好的 ...

随机推荐

  1. VS 报cmath(19): error C2061: 语法错误: 标识符“acosf” 错误

    这是因为我在.c文件中用了 #include <iostream> using namespace std; 这样编译的时候就报: 出现错误类型如下:1>c:\program fil ...

  2. docfx daylybuild

    参考:https://myget.org/gallery/docfx-dev 根据对应的vs或nuget版本中添加地址. PS:daylybuild可能包含很多错误哦.

  3. 51Nod-1265 四点共面

    51Nod 1265 : http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1265 1265 四点共面 基准时间限制:1 秒 ...

  4. css 补漏

    1.box-sizing: width(宽) + padding(内边距) + border(边框) = 元素实际宽度    height(高) + padding(内边距) + border(边框) ...

  5. 跳转Activity两种方法

    摘要:假设从A界面开启另外一个B界面根据是否需要返回数据分为两种方式 一.无需返回数据方式 在A界面中调用startActivity方法进行直接跳转即可 二.需要返回数据方式 1.在A界面中调用sta ...

  6. Java调用Linux命令

    // int tp = 1 返回执行结果  非1 返回命令执行后的输出 public static String runCommand(String cmd, int tp) { StringBuff ...

  7. redis配置详解

    ##redis配置详解 # Redis configuration file example. # # Note that in order to read the configuration fil ...

  8. [C#] 使用NPOI将Datatable保存到Excel

    using (table) { IWorkbook workbook = new HSSFWorkbook(); ISheet sheet = workbook.CreateSheet(); IRow ...

  9. 如何将Emmet安装到到 Sublime text 3?

    看清楚哦~~这是Sublime text 3不是2的版本,两者的安装还是有区别的,下面的方法是我感觉比较简单的,其他的要命令什么的感觉太复杂了,经测试是OK的. ONE:建议到官方下载Sublime  ...

  10. Easymake

    Easymake太好用了,偷懒神器,强力推荐. 一.根目录下的easymake.mk就是makefile模板,我们自定义的makefile只需要包含这个模板即可 include ../../easym ...