git @ Cat's Eye Technologies Tamsin / 0.2 bin / inhex
0.2

Tree @0.2 (Download .tar.gz)

inhex @0.2raw · history · blame

#!/usr/bin/env python

# converts hex couples on input to raw bytes on output.

import sys

while True:
    hex = sys.stdin.read(2)
    if len(hex) < 2:
        sys.exit(0)
    sys.stdout.write(chr(int(hex, 16)))