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. Execute at import time
  15. Runtime loading of modules
  16. Conditional loading of modules
  17. What is in our namespace?
  18. Runtime import
  19. Duplicate importing of functions
  20. Duplicate importing of functions - solved
  21. Script or library
  22. Script or library - import
  23. Script or library - from import
  24. Scope of import
  25. Import multiple times
  26. Do not import *
  27. Exercise: Number guessing
  28. Exercies: Scripts and modules
  29. Exercise: Module my_sum
  30. Exercise: Convert your script to module
  31. Exercise: Add doctests to your own code
  32. Solution: Module my_sum
  33. Loaded modules and their path
  34. Built-in modules