-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·44 lines (31 loc) · 1.1 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/python
#import statements
import sys
sys.path.append('./twilio-api/')
sys.path.append('./app/')
from messages import Messages
from accounts import Accounts
from main_app import App
from tkinter import *
from datetime import datetime, timezone
import time
#instaniate objects for later use
messenger = Messages()
accountNumbers = Accounts()
app = App()
##### METHODS THAT WILL PROBABLY BE MOVED #####
def printSingleThread(number, accountNumber):
messages = messenger.returnSingleThread(number, accountNumber)
for message in messages:
print("")
print(message[1])
print(message[2])
print(message[3].strftime("%B %d, %Y %I:%M%p %Z"))
accountNumbers = accountNumbers.returnActiveNumbers()
print(accountNumbers)
accountNumberChoice = input("Choose an account: 1-" + str(len(accountNumbers)) + " : ")
accountNumber = accountNumbers[int(accountNumberChoice)-1]
number = input("Which conversation would you like to enter? ")
printSingleThread(number, accountNumber)
if(messenger.sendMessage(accountNumber, number, input("Reply: "))):
printSingleThread(number, accountNumber)