Skip to content
Snippets Groups Projects
Commit e496b99c authored by Nicolas Mansard's avatar Nicolas Mansard
Browse files

Minor changes in thread loop.

parent 7e6a9574
No related branches found
No related tags found
No related merge requests found
......@@ -68,3 +68,18 @@ def loopInThread( funLoop ):
def loop(self):
funLoop()
return ThreadViewer
from dynamic_graph.script_shortcuts import optionalparentheses
# Define the 4 classical shortcuts to control the loop.
def loopShortcuts(runner):
@optionalparentheses
def go(): runner.play()
@optionalparentheses
def stop(): runner.pause()
@optionalparentheses
def next(): runner.loop()
class NextInc:
def __add__(self,x):
for i in range(x): next()
n=NextInc()
return [go,stop,next,n]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment