Python is a general-purpose interpreted programming language. It emphasizes readability through the use of whitespace and supports multiple programming paradigms such as functional and object-oriented models.
Using External Modules
Python has a robust community that contributes to external modules. In the past, these had to be downloaded and often even individually compiled for different operating systems. To help streamline this process, the tool pip now exists.
For Linux-based and MacOS X systems, pip can be installed (if it is not already) through following the instructions on the Installation page.
For Windows systems, it is highly recommended to download a version of Python 3 or greater that comes with pip built into it.
As a command-line tool, pip is used through typing commands.
To install a package using pip, it looks like the following:
pip install packageName
Once a package is installed, it is available to be used in a Python file.
Working with Modules
To include an external module in a Python project the keywords from and import are used.
Some modules contain many files or multiple possible modules to use. The from keyword helps in selecting from what project to include files.
The import keyword includes the specified modules. When used on a collection of files, it will include all of them. When paired with from in the pattern of from… import… only the specified modules will be included.