bec_lib.user_scripts_mixin.UserScriptsMixin#

class UserScriptsMixin[source]#

Bases: object

Methods

forget_all_user_scripts

unload / remove loaded user scripts from builtins.

forget_user_script

unload / remove a user scripts.

list_user_scripts

display all currently loaded user functions

load_all_user_scripts

Load all scripts from the scripts directory.

load_user_script

load a user script file and import all its definitions

forget_all_user_scripts() None[source]#

unload / remove loaded user scripts from builtins. Files will remain untouched.

Runs a callback of type EventType.NAMESPACE_UPDATE to inform clients about removing objects from the namesapce.

forget_user_script(name: str) None[source]#

unload / remove a user scripts. The file will remain on disk.

list_user_scripts()[source]#

display all currently loaded user functions

load_all_user_scripts() None[source]#

Load all scripts from the scripts directory.

Runs a callback of type EventType.NAMESPACE_UPDATE to inform clients about added objects in the namesapce.

load_user_script(file: str) None[source]#

load a user script file and import all its definitions

Parameters:

file (str) – Full path to the script file.