pyblock/pybitblock/feed.py

26 lines
725 B
Python
Raw Normal View History

2020-06-04 14:28:45 -03:00
#Developer: Curly60e
#PyBLOCK its a clock of the Bitcoin blockchain.
2020-06-04 14:28:45 -03:00
import os
import os.path
import subprocess
import time as t
def readFile():
try:
print ("\n\033[1;34;40mWaiting for new data...\n")
2020-06-25 13:11:07 +00:00
downloadsFolder = 'downloads/'
while True:
if not os.listdir(downloadsFolder):
continue
else:
print("\t\t\n\033[1;33;40mNew message from Space just arrived...\033[0;37;40m\n")
subprocess.run(["cat", "downloads/*"])
subprocess.run(["rm", "downloads/*"])
except Exception:
subprocess.run(["pkill", "-9", "-f", "api_data_reader.py"])
subprocess.run(["pkill", "-9", "-f", "demo-rx.py"])