Changeset 40 for trunk/bin/bletchley-encode
- Timestamp:
- 03/17/13 22:26:27 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/bletchley-encode
r28 r40 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 3 # Requires Python 2.7+3 # Requires Python 3+ 4 4 5 5 ''' … … 46 46 sys.exit(0) 47 47 48 input_file = sys.stdin 48 input_file = sys.stdin.buffer 49 49 if options.input_file is not None: 50 50 input_file = file(options.input_file, 'rb') … … 55 55 specified_encodings.reverse() 56 56 # XXX: report invalid encodings 57 sys.stdout. write(blobtools.encodeChain(specified_encodings, blob))58 sys.stdout. write('\n')57 sys.stdout.buffer.write(blobtools.encodeChain(specified_encodings, blob)) 58 sys.stdout.buffer.write(b'\n')
Note: See TracChangeset
for help on using the changeset viewer.