fintic-tracker/test.py

42 lines
880 B
Python

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
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()