2021-05-01 10:39:20 +00:00
|
|
|
|
2021-04-27 18:29:14 +00:00
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import threading
|
|
|
|
from PIL import Image, ImageDraw, ImageFont
|
|
|
|
import time
|
|
|
|
import csv
|
|
|
|
|
|
|
|
from rgbmatrix import RGBMatrix, RGBMatrixOptions
|
|
|
|
from stockTicker import StockTicker
|
2021-04-28 19:39:30 +00:00
|
|
|
import finnhub
|
|
|
|
|
2021-05-01 10:39:20 +00:00
|
|
|
import pexpect
|
2021-04-27 18:29:14 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2021-05-01 10:39:20 +00:00
|
|
|
#stock_ticker = StockTicker()
|
2021-04-28 19:39:30 +00:00
|
|
|
SandboxApiKey = "sandbox_c24qddqad3ickpckgg8g"
|
|
|
|
ApiKey = "c24qddqad3ickpckgg80"
|
2021-05-01 10:39:20 +00:00
|
|
|
|
2021-04-28 19:39:30 +00:00
|
|
|
#stock_ticker.runStockTicker('', 1, 1)
|
2021-05-01 10:39:20 +00:00
|
|
|
#stock_ticker.GetSymbols()
|
|
|
|
#stock_ticker.GetfullStockImage()
|
|
|
|
#stock_ticker.ScrollImageTransition(['final.ppm', 'final.ppm'], offset_x = 0, offset_y = 0, delay = 0.02)
|
|
|
|
print('hello')
|
|
|
|
|
|
|
|
child = pexpect.spawn("sudo -E python3 stockTicker.py")
|
|
|
|
|
|
|
|
time.sleep(3)
|
|
|
|
child.sendline('R')
|
|
|
|
print('sent stocks')
|
|
|
|
time.sleep(3)
|
|
|
|
child.sendline('K')
|
|
|
|
print('sent kill')
|
|
|
|
time.sleep(3)
|
|
|
|
|
|
|
|
#time.sleep(3)
|
|
|
|
#child.sendline('stop')
|
|
|
|
#print('sent stop')
|
|
|
|
#stock_ticker.displayMatrix()
|
2021-04-28 19:39:30 +00:00
|
|
|
|
2021-04-27 18:59:25 +00:00
|
|
|
|