You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
408 B
17 lines
408 B
#!/usr/bin/env python
|
|
|
|
import time, electrum
|
|
|
|
electrum.set_verbosity(False) # default is True
|
|
network = electrum.Network({'auto_cycle':True})
|
|
network.register_callback('peers',lambda: electrum.print_json(network.irc_servers.keys()))
|
|
|
|
if not network.start(wait=True):
|
|
print "Not connected"
|
|
exit(1)
|
|
|
|
print "Connected to", network.interface.server
|
|
while not network.irc_servers:
|
|
time.sleep(1)
|
|
|
|
|
|
|