science_jubilee.tools.Tool#

Exceptions#

ToolStateError

Raise this error if the tool is in the wrong state to perform such a command.

ToolConfigurationError

Raise this error if there is something wrong with how the tool is configured

Classes#

Functions#

requires_active_tool(func)

Decorator to ensure that a tool cannot complete an action unless it is the

Module Contents#

exception science_jubilee.tools.Tool.ToolStateError[source]#

Bases: Exception

Raise this error if the tool is in the wrong state to perform such a command.

exception science_jubilee.tools.Tool.ToolConfigurationError[source]#

Bases: Exception

Raise this error if there is something wrong with how the tool is configured

class science_jubilee.tools.Tool.Tool(index, name, **kwargs)[source]#
_machine = None[source]#
index[source]#
name[source]#
is_active_tool = False[source]#
tool_offset = None[source]#
post_load()[source]#

Run any code after tool has been associated with the machine.

science_jubilee.tools.Tool.requires_active_tool(func)[source]#

Decorator to ensure that a tool cannot complete an action unless it is the current active tool.