FittsLaw/utils/console.py

14 lines
464 B
Python
Raw Normal View History

2020-05-15 14:06:34 -04:00
import requests
base = input('Enter URL of server instance (http://example.com): ')
device = input('Which input method are we managing?: ')
while True:
choice = input('Enter Participant ID (or quit): ')
if choice == 'quit':
break
2020-05-27 01:23:27 -04:00
r = requests.post(base + '/' + device + 'Post',params={'id':choice})
2020-05-15 14:06:34 -04:00
if r.status_code is 200:
print('Updated')
else:
print('Error occured')
print(r.status_code)
print(r.text)