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