def __init__(self):
super(CurvePlugin, self).__init__(name='curve')
self._commands = [
- InfoCommand(self), ExportCommand(self),
+ GetCommand(self), InfoCommand(self), ExportCommand(self),
DifferenceCommand(self), DerivativeCommand(self),
PowerSpectrumCommand(self)]
# Define commands
+class GetCommand (Command):
+ """Return a :class:`hooke.curve.Curve`.
+ """
+ def __init__(self, plugin):
+ super(GetCommand, self).__init__(
+ name='get curve', arguments=[CurveArgument],
+ help=self.__doc__, plugin=plugin)
+
+ def _run(self, hooke, inqueue, outqueue, params):
+ outqueue.put(params['curve'])
+
class InfoCommand (Command):
"""Get selected information about a :class:`hooke.curve.Curve`.
"""