tupdate peers script - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f4c26dfac0a8b518aeee4adb5215971b72209c39 DIR parent 1d26676ee9afd5f6d83a5b52cb9cf5e820a241b9 HTML Author: thomasv <thomasv@gitorious> Date: Wed, 14 Aug 2013 16:22:13 +0200 update peers script Diffstat: M scripts/peers | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) --- DIR diff --git a/scripts/peers b/scripts/peers t@@ -1,11 +1,9 @@ #!/usr/bin/env python -from electrum import Interface +from electrum import interface, Interface -i = Interface({'server':'ecdsa.org:50001:t'}) +i = Interface() i.start() -i.send([('server.peers.subscribe',[])]) - -while True: - r = i.get_response() - print r.get('result') +servers = i.synchronous_get([('server.peers.subscribe',[])])[0] +servers = i.parse_servers( servers ) +print servers