Modules
- Goal of having modules
- Before modules
- Create modules
- path to load modules from - The module search path
- sys.path - the module search path
- Project directory layouts
- Flat project directory structure
- Absolute path
- Relative path
- Relative path explained
- Submodules
- Python modules are compiled
- How "import" and "from" work?
- Execute at import time
- Runtime loading of modules
- Conditional loading of modules
- What is in our namespace?
- Runtime import
- Duplicate importing of functions
- Duplicate importing of functions - solved
- Script or library
- Script or library - import
- Script or library - from import
- Scope of import
- Import multiple times
- Do not import *
- Exercise: Number guessing
- Exercies: Scripts and modules
- Exercise: Module my_sum
- Exercise: Convert your script to module
- Exercise: Add doctests to your own code
- Solution: Module my_sum
- Loaded modules and their path
- Built-in modules