auto run
This commit is contained in:
@@ -13,6 +13,7 @@ import datetime
|
|||||||
import threading
|
import threading
|
||||||
import csv
|
import csv
|
||||||
import pexpect
|
import pexpect
|
||||||
|
import time
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
#stock_ticker = StockTicker()
|
#stock_ticker = StockTicker()
|
||||||
@@ -32,8 +33,10 @@ ALLOWED_EXTENSIONS = {'csv', 'png'}
|
|||||||
#ticker.stdin.write(b'from server')
|
#ticker.stdin.write(b'from server')
|
||||||
#print(ticker.stdout.readlines())
|
#print(ticker.stdout.readlines())
|
||||||
#(output, errs)
|
#(output, errs)
|
||||||
ticker = pexpect.spawn("sudo -E python3 stockTicker.py")
|
|
||||||
|
|
||||||
|
time.sleep(10) # let api calls finish
|
||||||
|
ticker = pexpect.spawn("sudo -E python3 stockTicker.py")
|
||||||
|
ticker.sendline('S') # run by default
|
||||||
#stock_ticker = StockTicker()
|
#stock_ticker = StockTicker()
|
||||||
|
|
||||||
def allowed_file(filename):
|
def allowed_file(filename):
|
||||||
|
Reference in New Issue
Block a user