spectrochempy.Script

class Script(**kwargs)[source]

Executable scripts.

The scripts are used in a project.

Parameters
  • name (str) – Name of the script. The name should be unique.

  • content (str) – Content of sthe script.

  • parent (instance of |Project|) – Parent project.

  • priority (int) – Default=50.

Examples

Make a script

>>> s = "set_loglevel(INFO)"
>>> s = "info_('Hello')"
>>> myscript = scp.Script("print_hello_info", s)

Execute a script

>>> scp.run_script(myscript)

Examples using spectrochempy.Script

Project creation

Project creation