Advertisement
skip420

satoshi.py

Nov 25th, 2017
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. # this goes into the same directory as scan-wallets.py&process-claims.py&login.py
  2.  
  3. import glob
  4. from decimal import *
  5. getcontext().prec = 8
  6.  
  7. P = glob.glob('./*.sat*')
  8.  
  9. satoshi = 0
  10.  
  11. for x in range(len(P) - 1):
  12.     f = open(P[x], 'r')
  13.     sat = f.read()
  14.     if(len(sat) > 0):
  15.       satoshi = int(satoshi) + int(sat)
  16.  
  17. BTC = Decimal(satoshi) / Decimal(100000000)
  18.  
  19. f = open('rawsatoshi.txt', 'w')
  20. f.write(str(satoshi))
  21. f.close()
  22.  
  23. f = open('satoshi.html', 'w')
  24. f.write(str(BTC) + '\n')
  25. f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement