-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecute.py
More file actions
34 lines (25 loc) · 844 Bytes
/
execute.py
File metadata and controls
34 lines (25 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/env python3
import os, sys
def main():
print(len(sys.argv))
arglist = sys.argv[1].split(",")
if len(arglist) < 4:
print("ERROR: Need at least 4 parameters.")
print("Exit.")
sys.exit(1)
hven=-1
if sys.argv[2]=="":
print("There is no connected HVB.")
elif len(sys.argv[2].split(","))>1:
print("Both channels 0 & 1 HVBs are connected.")
hven=2
elif len(sys.argv[2].split("0"))>1:
print("Channel 0 HVB is connected.")
hven=0
elif len(sys.argv[2].split("1"))>1:
print("Channel 1 HVB is connected.")
hven=1
os.system(f'python3 mbfasttest.py --mbsnum="{arglist[0]}" --host="{arglist[1]}" --port="{arglist[2]}" --author="{arglist[3]}" --hven={hven} --hvv=200')
sys.exit(0)
if __name__ == "__main__":
main()