spectrochempy.Script๏ƒ

class Script(name='unamed_script', content=None, parent=None, priority=50.0, **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, optional, default: 50) โ€“ priority.

See also

Project

Object containing NDDatasetโ€™s, sub-Projectโ€™s and Script.

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