[last updated: 2019-10-28]
go to: Python home page
-----
I confess to not understanding libraries in any depth. But here's what I think I know:
- Libraries and modules and packages are all names that can be applied to different types of files or groups of files. I have not researched the precise definitions of the terms, so it's likely I am going completely against convention by my usage, but regardless, in this I will be using the term 'library' somewhat generically. The key functional equivalence between the various types is that they are all 'imported' into your python program, and they all contain functions that can be used in your main program once so imported.
- Libraries are typically imported with a statement such as:
import time
or: from time import sleep
or: from time import *
or: from RPi.GPIO import ... as gpio [this is wrong, but is sort of an approximation...]
I don't know what circumstances would warrant one type of import over another...
- Libraries can contain a variety of things, but typically they will contain type defs and functions defs that need to be used by your program. Putting them in the library clears the clutter and complexity out of your program.
.
.
.
eof