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. Exercise: Number guessing
  27. Exercies: Scripts and modules
  28. Exercise: Module my_sum
  29. Exercise: Convert your script to module
  30. Exercise: Add doctests to your own code
  31. Solution: Module my_sum
  32. Loaded modules and their path
  33. Built-in modules