Product SiteDocumentation Site

12.2. Importing modules

There are different ways to import modules. We already saw one way to do this. You can even import selected functions from modules. To do so:

>>> from bars import simplebar, starbar
>>> simplebar(20)
--------------------

Or you can import all functions or variables from a module directly into the current namespace by using *

>>> from bars import *
>>> hashbar(20)
####################