In [ ]:
import os,sys
sys.path.insert(0, os.path.abspath('..'))
from hublib.ui import RunCommand
In [ ]:
def my_start(s):
s.run("uname -a")
#s.run("while true; do echo Hi; sleep 1; done")
In [ ]:
# after the run finished, optionally do something
# with the output
def read_data(s):
# output is in s.output.value
print(s.output.value)
In [ ]:
RunCommand(start_func=my_start, done_func=read_data)