bokeh.application.handlers.code_runner#
提供一个实用类 CodeRunner
供执行 Python 源代码的处理程序使用。
- class CodeRunner(source: str, path: str | PathLike[str], argv: list[str], package: ModuleType | None = None)[source]#
编译并运行Python源代码。
- __init__(source: str, path: str | PathLike[str], argv: list[str], package: ModuleType | None = None) None [源代码]#
- new_module() ModuleType | None [source]#
创建一个新的模块来运行。
- Returns:
模块