hooke.ui.gui was getting complicated, so I stripped it down for a moment.
[hooke.git] / hooke / plugin / curve.py
index 9471318f81582f2055f259a145ffd9b66121104a..56b43799ffd358096b6ddd142853bf38acc42771 100644 (file)
@@ -38,7 +38,7 @@ class CurvePlugin (Builtin):
     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)]
 
@@ -64,6 +64,17 @@ of the current playlist.
 
 # 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`.
     """