env

Environment related macros

class dumpenv(*args, **kwargs)[source]

Dumps the complete environment

run()[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class lsvo(*args, **kwargs)[source]

Lists the view options

run()[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class setvo(*args, **kwargs)[source]

Sets the given view option to the given value

run(name, value)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class usetvo(*args, **kwargs)[source]

Resets the value of the given view option

run(name)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class lsenv(*args, **kwargs)[source]

Lists the environment in alphabetical order

prepare(macro_list, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

run(macro_list)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class senv(*args, **kwargs)[source]

Sets the given environment variable to the given value

run(env, value)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class usenv(*args, **kwargs)[source]

Unsets the given environment variable

run(env)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class load_env(*args, **kwargs)[source]

Read environment variables from config_env.xml file

run()[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class lsgh(*args, **kwargs)[source]

List general hooks.

Note

The lsgh macro has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including its removal) may occur if deemed necessary by the core developers.

run()[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class defgh(*args, **kwargs)[source]

Define general hook:

>>> defgh "mv [[mot02 9]]" pre-scan
>>> defgh "ct 0.1" pre-scan
>>> defgh lsm pre-scan
>>> defgh "mv mot03 10" pre-scan
>>> defgh "Print 'Hello world'" pre-scan

Note

The defgh macro has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including its removal) may occur if deemed necessary by the core developers.

run(macro_name, position)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class udefgh(*args, **kwargs)[source]

Undefine general hook. Without arguments undefine all.

Note

The lsgh macro has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including its removal) may occur if deemed necessary by the core developers.

run(macro_name, hook_pos)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError