How to make the "word" variable take the lines from a text file automatically? After processing the first line, the result is output, written to a file, and then everything repeats with the second, third, etc. line.
__author__ = 'xcbtrader' # -*- coding: utf-8 -*- from bitcoin import * def crear_addr_word(word): priv = sha256(word) pub = privtopub(priv) addr = pubtoaddr(pub) wif = encode_privkey(priv, 'wif') return addr, priv, wif word = input('Ведите фразу') addr, priv, wif = crear_addr_word(word) print('####################################################') print('WORD: ' + word) print('ADDR: ' + addr) print('PRIV: ' + priv) print('WIF: ' + wif) print('####################################################')
coding: utf-8better at the very top (after the#!-stars if any) to indicate. Although on Python 3 this line can be omitted altogether (utf-8 is the default value for encoding the source code) - jfs