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. Project directory layouts
  7. Flat project directory structure
  8. Absolute path
  9. Relative path
  10. Relative path explained
  11. Submodules
  12. Python modules are compiled
  13. How "import" and "from" work?
  14. Runtime loading of modules
  15. Conditional loading of modules
  16. What is in our namespace?
  17. Runtime import
  18. Duplicate importing of functions
  19. Script or library
  20. Script or library - import
  21. Script or library - from import
  22. Scope of import
  23. Execute at import time
  24. Import multiple times
  25. Exercise: Number guessing
  26. Exercies: Scripts and modules
  27. Exercise: Module my_sum
  28. Exercise: Convert your script to module
  29. Exercise: Add doctests to your own code
  30. Solution: Module my_sum
  31. Loaded modules and their path
  32. Built-in modules