The unofficial CircuitPython Reference

from

description

In Python and CircuitPython, modules may be imported in whole or in part. The from keyword is used to specify specific objects to import from a module. The from keyword is always used in conjunction with the import keyword.

syntax

from <moduleName> import <moduleSection>, <*optional* etc.>

methods

parameters

moduleName : case-sensitive name of module from which to import

moduleSection : case-sensitive name of specific sections to import

returns

Global variables, classes, and methods specified by <moduleSection>

example code

serial output:

see also: