Python Programming - Python’s Interactive Help

Python Programming – Python’s Interactive Help

Python comes with a built-in help utility, which is one of the major features and support of the Python language. The prerequisite of using the built-in help of Python, you must have a little knowledge of programming. For a new programmer, it could be a bit off-putting. Once, a programmer becomes familiar with programming terminology then he can make great use of built-in help provided by Python. Python programming help can be obtained in the following ways:

  • Interactive mode help
  • Getting help online through a web browser

Interactive mode help

The programmer can obtain help by running the help system inside the Python interactive mode environment. The help system has its own prompt. For this, type help() at the Python prompt and you will get the help prompt (help>) with a welcome message and some suggestions to get help on any module, keyword, topic, etc as shown in Fig. 1.6. Then type the name of the topic you want help on such as help>import as shown in Fig. 1.7. We can see that the details of the import command can be seen from the Python interface with the – -more—option. This means more information about import can be obtained by pressing the space bar or Enter key.

Python Programming - Python’s Interactive Help chapter 1 img 1
Python Programming - Python’s Interactive Help chapter 1 img 2

The programmer can exit the help by typing the quit command at the help prompt which brings in the python prompt again as shown in Fig. 1.8. One can obtain the python help without leaving the python prompt by typing help(list) at the python prompt as shown in Fig. 1.9.

Python Programming - Python’s Interactive Help chapter 1 img 3

Python help through a web Browser

The programmer can obtain help online through a web browser by following the steps as under

  1. Open web browser.
  2. Type in the URL http://www.python.org/doc/ and press Enter key.
  3. This website archives documentation for every version of Python that has been released so far. The documentation for the most recent version is available at http://www.python.org/doc/current/.

Python Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *