git @ Cat's Eye Technologies Tamsin / master bin / hexout
master

Tree @master (Download .tar.gz)

hexout @masterraw · 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))