self.do_plot(0)
item_not_found=0
-
-
- def do_index(self,args):
- '''
- INDEX
- Prints the index of the current curve in the list
- -----
- Syntax: index
- '''
- print self.pointer+1, 'of', len(self.current_list)
def _run(self, hooke, inqueue, outqueue, params):
params['playlist'].jump(params['index'])
+class IndexCommand (Command):
+ """Print the index of the current curve.
+
+ The first curve has index 0.
+ """
+ def __init__(self):
+ super(IndexCommand, self).__init__(
+ name='curve index',
+ arguments=[
+ PlaylistArgument,
+ ],
+ help=self.__doc__)
+
+ def _run(self, hooke, inqueue, outqueue, params):
+ outqueue.put(params['playlist']._index)
+
class SaveCommand (Command):
"""Save a playlist.
"""