apace.utils

Module Contents

Classes

Signal

A callable signal class to which callbacks can be registered.

Flag

Attribute

Generic enumeration.

class apace.utils.Signal(*signals)

A callable signal class to which callbacks can be registered.

When ever the signal is emitted all registered functions are called.

Parameters

signals (Signal, optional) – Signals which this signal gets registered to.

Attributes

callbacks

Functions called when the signal is emitted.

__repr__

Methods

__call__(*args, **kwargs)

Emit signal and call registered functions.

__str__()

Return str(self).

connect(callback)

Connect a callback to this signal.

Parameters

callback (function) – Function which gets called when the signal is emitted.

class apace.utils.Flag(initial_value, signals=None)

Methods

__bool__()
set_value(value)
class apace.utils.Attribute

Inherits: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

Attributes

LENGTH
ANGLE
K1
K2
K3
E1
E2

Methods

_generate_next_value_(start, count, last_values)

Generate the next value when not given.

name: the name of the member start: the initial start value or None count: the number of existing members last_value: the last value assigned or None

_missing_( value) :classmethod:
__repr__()

Return repr(self).

__str__()

Return str(self).

__dir__()

Returns all members and all public methods

__format__(format_spec)

Returns format using actual value type unless __str__ has been overridden.

__hash__()

Return hash(self).

__reduce_ex__(proto)

Helper for pickle.

name()

The name of the Enum member.

value()

The value of the Enum member.