git @ Cat's Eye Technologies Falderal / rel_0_12 script / fa-hex-to-bin
rel_0_12

Tree @rel_0_12 (Download .tar.gz)

fa-hex-to-bin @rel_0_12raw · 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)))