fintic-tracker/test.py

42 lines
880 B
Python
Raw Normal View History

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
import finnhub
import pexpect
2021-04-27 18:29:14 +00:00
if __name__ == '__main__':
#stock_ticker = StockTicker()
SandboxApiKey = "sandbox_c24qddqad3ickpckgg8g"
ApiKey = "c24qddqad3ickpckgg80"
#stock_ticker.runStockTicker('', 1, 1)
#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-27 18:59:25 +00:00