모듈 임포트 하기
****************

이 장에서 설명하는 모듈은 다른 파이썬 모듈을 임포트하는 새로운 방법과
임포트 절차를 사용자 정의하기 위한 훅을 제공합니다.

이 장에서 설명하는 모듈의 전체 목록은 다음과 같습니다:

* "zipimport" --- Import modules from Zip archives

  * "ZipImportError"

  * zipimporter 객체

    * "zipimporter"

      * "create_module()"

      * "exec_module()"

      * "find_spec()"

      * "get_code()"

      * "get_data()"

      * "get_filename()"

      * "get_source()"

      * "is_package()"

      * "load_module()"

      * "invalidate_caches()"

      * "archive"

      * "prefix"

  * 예제

* "pkgutil" --- Package extension utility

  * "ModuleInfo"

  * "extend_path()"

  * "find_loader()"

  * "get_importer()"

  * "get_loader()"

  * "iter_importers()"

  * "iter_modules()"

  * "walk_packages()"

  * "get_data()"

  * "resolve_name()"

* "modulefinder" --- Find modules used by a script

  * "AddPackagePath()"

  * "ReplacePackage()"

  * "ModuleFinder"

    * "report()"

    * "run_script()"

    * "modules"

  * "ModuleFinder"의 사용 예

* "runpy" --- Locating and executing Python modules

  * "run_module()"

  * "run_path()"

* "importlib" --- "import"의 구현

  * 소개

  * 함수

    * "__import__()"

    * "import_module()"

    * "invalidate_caches()"

    * "reload()"

  * "importlib.abc" -- import와 관련된 추상 베이스 클래스

    * "MetaPathFinder"

      * "find_spec()"

      * "invalidate_caches()"

    * "PathEntryFinder"

      * "find_spec()"

      * "invalidate_caches()"

    * "Loader"

      * "create_module()"

      * "exec_module()"

      * "load_module()"

    * "ResourceLoader"

      * "get_data()"

    * "InspectLoader"

      * "get_code()"

      * "get_source()"

      * "is_package()"

      * "source_to_code()"

      * "exec_module()"

      * "load_module()"

    * "ExecutionLoader"

      * "get_filename()"

    * "FileLoader"

      * "name"

      * "path"

      * "load_module()"

      * "get_filename()"

      * "get_data()"

    * "SourceLoader"

      * "path_stats()"

      * "path_mtime()"

      * "set_data()"

      * "get_code()"

      * "exec_module()"

      * "load_module()"

      * "get_source()"

      * "is_package()"

    * "ResourceReader"

      * "open_resource()"

      * "resource_path()"

      * "is_resource()"

      * "contents()"

    * "Traversable"

      * "name"

      * "iterdir()"

      * "is_dir()"

      * "is_file()"

      * "joinpath()"

      * "__truediv__()"

      * "open()"

      * "read_bytes()"

      * "read_text()"

    * "TraversableResources"

      * "files()"

  * "importlib.machinery" -- 임포터와 경로 훅

    * "SOURCE_SUFFIXES"

    * "DEBUG_BYTECODE_SUFFIXES"

    * "OPTIMIZED_BYTECODE_SUFFIXES"

    * "BYTECODE_SUFFIXES"

    * "EXTENSION_SUFFIXES"

    * "all_suffixes()"

    * "BuiltinImporter"

    * "FrozenImporter"

    * "WindowsRegistryFinder"

    * "PathFinder"

      * "find_spec()"

      * "invalidate_caches()"

    * "FileFinder"

      * "path"

      * "find_spec()"

      * "invalidate_caches()"

      * "path_hook()"

    * "SourceFileLoader"

      * "name"

      * "path"

      * "is_package()"

      * "path_stats()"

      * "set_data()"

      * "load_module()"

    * "SourcelessFileLoader"

      * "name"

      * "path"

      * "is_package()"

      * "get_code()"

      * "get_source()"

      * "load_module()"

    * "ExtensionFileLoader"

      * "name"

      * "path"

      * "create_module()"

      * "exec_module()"

      * "is_package()"

      * "get_code()"

      * "get_source()"

      * "get_filename()"

    * "NamespaceLoader"

    * "ModuleSpec"

      * "name"

      * "loader"

      * "origin"

      * "submodule_search_locations"

      * "loader_state"

      * "cached"

      * "parent"

      * "has_location"

  * "importlib.util" -- 임포터를 위한 유틸리티 코드

    * "MAGIC_NUMBER"

    * "cache_from_source()"

    * "source_from_cache()"

    * "decode_source()"

    * "resolve_name()"

    * "find_spec()"

    * "module_from_spec()"

    * "spec_from_loader()"

    * "spec_from_file_location()"

    * "source_hash()"

    * "_incompatible_extension_module_restrictions()"

    * "LazyLoader"

      * "factory()"

  * 예

    * 프로그래밍 방식으로 임포트 하기

    * 모듈을 임포트 할 수 있는지 확인하기

    * 소스 파일을 직접 임포트 하기

    * Implementing lazy imports

    * 임포터 설정하기

    * "importlib.import_module()" 근사하기

* "importlib.resources" -- Package resource reading, opening and
  access

  * "Anchor"

  * "files()"

  * "as_file()"

  * Deprecated functions

    * "Package"

    * "Resource"

    * "open_binary()"

    * "open_text()"

    * "read_binary()"

    * "read_text()"

    * "path()"

    * "is_resource()"

    * "contents()"

* "importlib.resources.abc" -- Abstract base classes for resources

  * "ResourceReader"

    * "open_resource()"

    * "resource_path()"

    * "is_resource()"

    * "contents()"

  * "Traversable"

    * "name"

    * "iterdir()"

    * "is_dir()"

    * "is_file()"

    * "joinpath()"

    * "__truediv__()"

    * "open()"

    * "read_bytes()"

    * "read_text()"

  * "TraversableResources"

    * "files()"

* "importlib.metadata" -- Accessing package metadata

  * 개요

    * "PackageNotFoundError"

  * 기능적 API

    * 진입 지점

      * "entry_points()"

      * "EntryPoints"

      * "EntryPoint"

    * 배포 메타데이터

      * "metadata()"

      * "PackageMetadata"

    * 배포 버전

      * "version()"

    * 배포 파일

      * "files()"

      * "PackagePath"

    * 배포 요구 사항

      * "requires()"

    * Mapping import to distribution packages

      * "packages_distributions()"

  * 배포

    * "distribution()"

    * "Distribution"

  * Distribution Discovery

  * 검색 알고리즘 확장하기

* The initialization of the "sys.path" module search path

  * Virtual environments

  * _pth files

  * Embedded Python
