Company
Date Published
Author
Pedram Navid
Word count
2781
Language
English
Hacker News points
1

Summary

The text discusses Python's system of imports, modules, and packages. It highlights the differences between running a script directly vs. running it as a module using the `-m` option. The author explores how Python treats folders as packages, including implicit namespace packages, which were introduced in Python 3.3. The article also touches on relative imports, which can be tricky to use correctly. Finally, it provides guidance on creating and installing a minimal Python package, making it easy to run scripts from anywhere without worrying about the system path.