Projects : gbw-node : gbw-node_genesis

library/swaphex.py

Dir - Raw

1# Helpful for txid byte ordering weirdness.
2from sys import stdin, stdout
3from binascii import a2b_hex, b2a_hex
4while True:
5 stdout.write('> ')
6 stdout.flush()
7 line = stdin.readline()
8 if not line:
9 break
10 stdout.write(b2a_hex(a2b_hex(line.strip())[::-1]) + '\n')