bokeh.application.handlers.code_runner¶
Provide a utility class CodeRunner for use by handlers that execute
Python source code.
-
class
CodeRunner(source, path, argv)[source]¶ Compile and run Python source code.
-
run(module, post_check)[source]¶ Execute the configured source code in a module and run any post checks.
Parameters: - module (Module) – a module to execute the configured code in.
- post_check (callable) – a function that can raise an exception if expected post-conditions are not met after code execution.
-
error¶ If code execution fails, may contain a related error message.
-
error_detail¶ If code execution fails, may contain a traceback or other details.
-
failed¶ Trueif code execution failed
-
path¶ The path that new modules will be configured with.
-
source¶ The configured source code that will be executed when
runis called.
-