git://git.novaco.in
/
electrum-nvc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
synchronous_get batch method for interface
[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.responses.get(True, 100000000000)
12
except KeyboardInterrupt:
13
break
14
if r.get('method') == 'blockchain.numblocks.subscribe':
15
print r.get('result')