Commit 9b0e5db8 authored by Francesco Tripaldi's avatar Francesco Tripaldi
Browse files

First commit

parent b503b72d
NAME = start-command-sequence-cli
MAIN = start-command-sequence.py
DIRNAME = $(NAME:-cli=)
MODNAME = $(MAIN:.py=)
PY_FILES += $(wildcard src/*.py)
default: bin ${PY_FILES}
@cp ${PY_FILES} bin/${DIRNAME}
@echo "#!/usr/bin/env python\nimport sys\nsys.path.append(sys.path[0]+'/${DIRNAME}')\nfrom ${MODNAME} import main\nif __name__ == '__main__':\n main()\n" > bin/${NAME}
@chmod +x bin/${NAME} bin/${DIRNAME}/${MAIN}
bin:
@test -d $@ || mkdir -p $@/${DIRNAME}
clean:
@rm -fr bin/ src/*~
.PHONY: clean
#!/usr/bin/python3
#
# Send start command to sequence given in argument
# To be used in juction to a sequencer
#
from tango import *
import PyTango
import sys, os
import time
if __name__ == '__main__':
try:
seq_dev = DeviceProxy(sys.argv[1])
except DevFailed as df:
print(str(df))
sys.exit(1)
try:
seq_dev.command_inout('Start')
except:
sys.exit(1)
sys.exit(0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment