src/cpython/importlib

Lets

SOURCE_SUFFIXES: seq[string] = to(getAttr(pyImport("importlib.machinery"),
    "SOURCE_SUFFIXES"), seq[string])
DEBUG_BYTECODE_SUFFIXES: seq[string] = to(
    getAttr(pyImport("importlib.machinery"), "DEBUG_BYTECODE_SUFFIXES"),
    seq[string])
OPTIMIZED_BYTECODE_SUFFIXES: seq[string] = to(
    getAttr(pyImport("importlib.machinery"), "OPTIMIZED_BYTECODE_SUFFIXES"),
    seq[string])
BYTECODE_SUFFIXES: seq[string] = to(getAttr(pyImport("importlib.machinery"),
    "BYTECODE_SUFFIXES"), seq[string])
EXTENSION_SUFFIXES: seq[string] = to(getAttr(pyImport("importlib.machinery"),
    "EXTENSION_SUFFIXES"), seq[string])

Procs

proc import_module(name, package: string) {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc import_module(name: string) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc invalidate_caches() {....raises: [Exception, ValueError, OSError, IOError,
                                    EOFError, KeyError], tags: [RootEffect].}
proc reload(module: auto)
proc is_resource(package, name: string): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc all_suffixes(): seq[string] {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc cache_from_source(path: string): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc source_from_cache(path: string): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc decode_source(path: string): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc resolve_name(name, package: string): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc source_hash(source_bytes: string): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}