2020-05-06 16:34:55 -03:00
|
|
|
import os
|
|
|
|
|
import time as t
|
|
|
|
|
|
2020-05-06 17:04:20 -03:00
|
|
|
|
2020-05-06 16:34:55 -03:00
|
|
|
def getblock(): #get access to bitcoin-cli with the command getblockchaininfo
|
2020-05-06 17:04:20 -03:00
|
|
|
bitcoincli = " getblockchaininfo" #get blockchain information
|
|
|
|
|
os.system(path + bitcoincli)
|
|
|
|
|
|
2020-05-06 16:34:55 -03:00
|
|
|
def clear(): #clear the screen
|
|
|
|
|
os.system('cls' if os.name=='nt' else 'clear')
|
2020-05-06 17:04:20 -03:00
|
|
|
|
|
|
|
|
clear()
|
|
|
|
|
path = input("Path to your Bitcoin-cli: ")
|
|
|
|
|
|
|
|
|
|
|
2020-05-06 16:34:55 -03:00
|
|
|
while True: #Loop
|
|
|
|
|
clear() #call clear function that clears the screen
|
|
|
|
|
getblock() #call getblock function
|
2020-05-06 16:36:04 -03:00
|
|
|
t.sleep(3) #pause the loop for 3 seconds
|