def __init__(self):
""" Constructor. """
output = pexpect.run('electrum listaddresses')
print(output)
pattern = re.compile(r'\[\W*"[A-z0-9]+"\W*\]') #the specific output for electrum if 1 adress exists
print(pattern.search(output))
if(pattern.search(output)):
#if a wallet exists, initialize that one
print('using already existing wallet')
else:
self._create_wallet()
subprocess.call(['electrum', 'daemon', 'start'])
评论列表
文章目录