Skip to content

Load or run local user scripts

Benoit Formet requested to merge user_scripts into master

The idea is to allow users to load/run local scripts.

  • user_script_load with execute and export to current session env_dict (or provided namespace)
    • you can provide a namespace as parameter user_script_load('script', namespace=toto)
  • user_script_run with execute without changing current session env_dict or provided namespace
    • you can provide a globals namespace as parameter user_script_run('script', namespace=toto)
  • you can provide a full path (absolute) to the script
    • user_script_load("path/to/script")
  • or configure a home directory with user_script_homedir
    • must be set before first usage (no default), then it will remembered for next time (stored in redis per session)
  • you can list scripts available in homedir with list_user_script
Edited by Matias Guijarro

Merge request reports