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

Tree @rel_0_13 (Download .tar.gz)

fa-bin-to-hex @rel_0_13raw · history · blame

#!/usr/bin/env python

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

import sys

while True:
    byte = sys.stdin.read(1)
    if len(byte) < 1:
        sys.exit(0)
    sys.stdout.write('%02x' % ord(byte))