Browse Source

accept command line arguments

283
ThomasV 13 years ago
parent
commit
e84d524544
  1. 16
      client/mnemonic.py

16
client/mnemonic.py

@ -1864,15 +1864,11 @@ def mn_decode( wlist ):
return out return out
if __name__ == '__main__': if __name__ == '__main__':
import sys import sys
print len(words) if len( sys.argv ) == 1:
key = '6a8657c1f2566290be460fd51bb9f7fc' print 'I need arguments: a hex string to encode, or a list of words to decode'
ss = mn_encode(key) elif len( sys.argv ) == 2:
print key print ' '.join(mn_encode(sys.argv[1]))
print ss else:
print mn_decode(ss) print mn_decode(sys.argv[1:])

Loading…
Cancel
Save