Modules

  1. Goal of having modules
  2. Before modules
  3. Create modules
  4. path to load modules from - The module search path
  5. sys.path - the module search path
  6. Flat project directory structure
  7. Absolute path
  8. Relative path
  9. Relative path explained
  10. Python modules are compiled
  11. How "import" and "from" work?
  12. Runtime loading of modules
  13. Conditional loading of modules
  14. Duplicate importing of functions
  15. Script or library
  16. Script or library - import
  17. Script or library - from import
  18. Scope of import
  19. Execute at import time
  20. Import multiple times
  21. Exercise: Number guessing
  22. Exercies: Scripts and modules
  23. Exercise: Module my_sum
  24. Exercise: Convert your script to module
  25. Exercise: Add doctests to your own code
  26. Solution: Module my_sum