절대경로로 import해야 한다.
상대경로를 사용할 시 ImportError가 발생한다.
이유:
Note that relative imports are based on the name of the current module. Since the name of the main module is always "main", modules intended for use as the main module of a Python application must always use absolute imports.
__init__.py
파일의 역할__init__.py
파일이 있는 디렉토리가 package라는 것을 나타냄__init__.py
파일을 사용하여 사용하고자 하는 함수의 경로 단축 가능__init__.py
파일 안에 __all__
변수를 써서 사용되는 숨기고 싶은 함수를 숨길 수 있음