Next / Previous / Contents / TCC Help System / NM Tech homepage

13.5. The from statement

The purpose of the from statement is to use things (variables, functions, and so on) from modules. There are two general forms:

from M import *
from M import n0, n1, ...

where M is the name of a Python module. In the first form, all objects from that module are added to the local name space. In the second form, only the named objects n0, n1, ... are added.

There are two types of modules:

Compare this statement with the import statement below.