On this page
  1. pkgutil.extend_path
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

pkgutil.extend_path

Up: pkgutil | Next: pkgutil.get_data
Rel: pkgutil.get_data, pkgutil.get_importer, pkgutil.iter_importers, pkgutil.iter_modules
Ref: docs.python.org — pkgutil.extend_path
Tags: #public #python3 #stdlib #pkgutil


Import

import pkgutil
from pkgutil import extend_path

Signature & Overview

pkgutil.extend_path(path, name)

Extend a package's path.

Usage

import pkgutil

# Legacy namespace-package helper for __init__.py: __path__ = pkgutil.extend_path(__path__, __name__)
assert callable(pkgutil.extend_path)

Gotchas

REPL Inspect

from pkgutil import extend_path
help(extend_path)

Linked from

Related notes