-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_interface.py
More file actions
39 lines (34 loc) · 948 Bytes
/
test_interface.py
File metadata and controls
39 lines (34 loc) · 948 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
31
32
33
34
35
36
37
38
39
from pytivo import tivo_client
host = input("IP Address: ")
port = int(input("Port (Should be 31339): "))
tc = tivo_client.TivoClient(host, port)
print("STATUS: "+ tc.getStatus())
def menu():
print("""
1. Set Channel
2. Get Status
3. Send an IRCode
4. Teleport Somewhere
5. Send a keyboard code
""")
selection = int(input("Choose an action: "))
if selection == 1:
#Set Channel
print(tc.setChannel( input("Enter a channel number: ") ))
menu()
elif selection == 2:
#Get Status
print(tc.getStatus())
menu()
elif selection == 3:
#Send IRCode
print(tc.sendIRCode( input("Enter an IRCode: ") ))
menu()
elif selection == 4:
#Teleport
print(tc.teleport( input("Enter a teleport area") ))
menu()
elif selection == 5:
#Send Keyboard Code
menu()
menu()