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. iis上如何架设HTTPS网站

    对于HTTPS网站,大部分都比较陌生,觉得很难,其实只要申请好证书,只要在服务器上做下小配置就可以完成 首先,申请一个ssl证书 免费申请https://buy.wosign.com/free/Fre ...

  2. Echarts Map地图类型使用

    使用的时候出现了一个BUG, China地图的底色没有绘制出来,现在把一个小的DEMO给大家,以供参考,并附上参考文章(http://blog.csdn.net/danielinbiti/articl ...

  3. MySQL 常用的sql语句小结(待续)

    mysql 常用的sql语句 1.查看数据库各个表中的记录数 USE information_schema; SELECT table_name,table_rows FROM tables WHER ...

  4. DayPilot 7.8 DLL去DEMO字样下载

    来自 DayPilot 的 7.8.3169.1 版本的DLL,微调去掉了“DEMO”字样,供参考,商用请支持正版! 此处下载: http://files.cnblogs.com/files/pcca ...

  5. 【.NET】Nuget包,把自己的dll放在云端

    //发布自己的nuget包,1.自己的api KEY,2.自己的类库,3.nuget打包工具https://npe.codeplex.com/releases/view/620126          ...

  6. getGlobalVisibleRect和getLocalVisibleRect

    在看android官网的demo的时候遇到这两个api,开始不是很明白这两个方法的作用. 通过多次的调试和测试之后慢慢开始有了点眉目,为了防止以后忘记,以此博文为记. 作为测试的目的,我写了这样一个布 ...

  7. 理解Cookie和Session机制(转)

    目录[-] Cookie机制 什么是Cookie 记录用户访问次数 Cookie的不可跨域名性 Unicode编码:保存中文 BASE64编码:保存二进制图片 设置Cookie的所有属性 Cookie ...

  8. 移动端浏览器和微信浏览器上禁止body的滚动条

    一般禁止body滚动的做法就是设置overflow:hidden. 但是很奇怪的发现在移动端浏览器和微信浏览器上这个不起作用,然后我分析了我的写法,就是在body上加了一个class去定义属性,然后改 ...

  9. a版本冲刺第四天

    队名:Aruba   队员: 黄辉昌 李陈辉 林炳锋 鄢继仁 张秀锋 章  鼎 学号 昨天完成的任务 今天做的任务 明天要做的任务 困难点 体会 408 完成学习Java从入门到精通基础篇 通读了构建 ...

  10. linux中给PHP安装mongodb的扩展

    centos5.6 32bit php 5.2.17 php安装路径 /usr/local/php phpize路径 /usr/bin php-config路径 /usr/bin php.ini路径 ...