Modules


  1. Create modules
  2. path to load modules from - The module search path
  3. sys.path - the module search path
  4. Flat roject directory structure
  5. Absolute path
  6. Relative path
  7. Python modules are compiled
  8. How "import" and "from" work?
  9. Runtime loading of modules
  10. Conditional loading of modules
  11. Duplicate importing of functions
  12. Script or library
  13. Script or library - import
  14. Script or library - from import
  15. assert to verify values
  16. mycalc as a self testing module
  17. doctest
  18. Scope of import
  19. Export import
  20. Export import with __all__
  21. import module
  22. Exercise: Number guessing
  23. Exercies: Scripts and modules
  24. Exercise: Module my_sum
  25. Exercise: Convert your script to module
  26. Exercise: Add doctests to your own code
  27. Solution: Module my_sum