mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-14 12:43:15 +02:00
Add files via upload
This commit is contained in:
parent
1e3e46849b
commit
3fd358ee98
1 changed files with 15 additions and 0 deletions
15
Python-BlockClock.py
Normal file
15
Python-BlockClock.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import os
|
||||
import time as t
|
||||
|
||||
def getblock(): #get access to bitcoin-cli with the command getblockchaininfo
|
||||
bitcoincli = "/home/pi/Documents/bitcoin-0.19.1/bin/./bitcoin-cli -datadir=/mnt/royal/Bitcoin getblockchaininfo"
|
||||
os.system(bitcoincli)
|
||||
|
||||
def clear(): #clear the screen
|
||||
os.system('cls' if os.name=='nt' else 'clear')
|
||||
|
||||
|
||||
while True: #Loop
|
||||
clear() #call clear function that clears the screen
|
||||
getblock() #call getblock function
|
||||
t.sleep(3) #pause the loop for 3 seconds
|
||||
Loading…
Add table
Add a link
Reference in a new issue