Python pydoc.py

Source: Internet
Author: User
Tags acos asin mathematical functions

1. To view the help, we can use the helper function in the Python command-line interactive environment, such as:

To view the Math module:

>>> 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. Or use pydoc.py to view, for example:

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. Or you can use pydoc.py to generate HTML Help documents:

For example, on port 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

Then you can open http://localhost:8000/with your browser to see the Help document


Server> quit
Server commands: [B]rowser, [Q]uit
Server> uit
Server commands: [B]rowser, [Q]uit
Server> Q
Server stopped

4. You can also generate an HTML page with the-W parameter:

C:\users\dell\appdata\local\programs\python\python35\lib>python pydoc.py-w Math
Wrote math.html

And then you can see math.html under the C:\Users\dell\AppData\Local\Programs\Python\Python35\Lib.

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

Python pydoc.py

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.