INNER CODE UNIT · Python

_from_pickle_callback

pybel/pybel · src/pybel/cli.py:99

def _from_pickle_callback(ctx, param, file):
    path = file.name

    if not path.endswith(".bel"):
        return from_pickle(file)

    cache_path = get_corresponding_pickle_path(path)

    if not os.path.exists(cache_path):
        click.echo(
            f"The BEL script {path} has not yet been compiled. First, try running the following command:\n\n "
            f"pybel compile {path}\n",
        )
        sys.exit(1)

    return from_pickle(cache_path)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…