git://git.novaco.in
/
electrum-nvc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
16aa5e7f35b781e4cdade4408aa59b4ae6d27d5f
[electrum-nvc.git]
/
scripts
/
blocks
1
#!/usr/bin/env python
2
3
import electrum
4
5
i = electrum.Interface()
6
i.start()
7
i.send([('blockchain.numblocks.subscribe',[])])
8
9
while True:
10
try:
11
r = i.get_response()
12
except KeyboardInterrupt:
13
break
14
if r.get('method') == 'blockchain.numblocks.subscribe':
15
print r.get('result')