Pythonのimportシステムについて調べたときに参考になったサイトの備忘録です
- https://www.slideshare.net/uckey/general-python-import-mechanism
- https://the-hitchhikers-guide-to-packaging.readthedocs.io/en/latest/introduction.html
メモ
- moduleとpackageがある
- Python2.7では基本的には__init__.pyがあることでpackageとして認識される
- importはsys.path→sys.modules
- .pthファイルというのがあって、.pthファイルでsys.pathにパスを通す方法もある