-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
24 lines (18 loc) · 904 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import time, os # Default Python Libraries
from client.client import * # Importing The Client/Task Manager
# Global Variables (Sleep Time For Ability To See Results, Is Not Needed)
SLEEP_TIME: float = 0.25
if __name__ == '__main__':
client: Client = Client(load=False, disp=True, prnt=True) # Creating The Client
with client.camera as cam:
while True:
# Clearing Terminal & Getting Inputs
os.system('cls' if os.name == 'nt' else 'clear')
inputs = input().split(' ')
command, args = inputs[0].lower(), inputs[1:]
# Parsing Commands, Running Tasks, & Sleeping For Ability To See Results
if (command == 'exit' or command == 'e'): break
if (command == 'quit' or command == 'q'): break
task = client.interpret_task(command)
result = task(args)
time.sleep(SLEEP_TIME)