def get_monitor(): name_ = input_box.get() c = Company(name_) text_box.insert('end', 'sending email to ' + c.email_list[0] + '\n') var.set('sending email to ' + c.email_list[0] + '\n') for i in range(1, 10): time.sleep(2) var.set('sending email to ' + c.email_list[0] + str(i) + '\n') c.monitor()
import time from main import Company apple = Company('google') print('Ticker: ', apple.ticker) print('Keyword: ', apple.keyword) print('The latest Closing price: ', round(apple.price()['Close'].values[0], 2)) print('Summary: ', apple.summary()) print('Prediction: ', apple.prediction()) print('Sending email...') apple.email() print('Sending email successfully.') print('start monitor apple') apple.monitor() print(apple) time.sleep(1) print(sleep) time.sleep(1) time.sleep(1) print(sleep) time.sleep(1) time.sleep(1) print(sleep) time.sleep(1) time.sleep(1) print(sleep) time.sleep(1) iime.sleep(1) print(sleep) time.sleep(1)