-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLabControlCLI.py
More file actions
28 lines (21 loc) · 876 Bytes
/
LabControlCLI.py
File metadata and controls
28 lines (21 loc) · 876 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
# Example of using this library with a simple CMD
# line interface, INCOMPLETE, Needs expansion
import cmd
from LaserController import LaserController
class LabControlCLI(cmd.Cmd):
intro = 'Welcome to the lab control CLI. Type help or ? to list commands.\n'
prompt = '|QC-atom-lab|> '
def do_set_current(self, arg):
'Set the current of the laser: set_current <current>'
# laser_controller = LaserController()
# laser_controller.set_current(float(arg))
print("Not actually setting the current just printing")
# def do_get_current(self, arg):
# 'Get the current of the laser: get_current'
# laser_controller = LaserController()
# print(laser_controller.get_current())
def do_exit(self, arg):
'Exit the CLI'
return True
if __name__ == '__main__':
LabControlCLI().cmdloop()