Ignore:
Timestamp:
03/17/13 22:26:27 (11 years ago)
Author:
tmorgan
Message:

Switched to python3 only, since supporting both 2.x and 3.x is such a pain

Added preliminary python-requests support to http2py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/bletchley-decode

    r28 r40  
    1 #!/usr/bin/env python
     1#!/usr/bin/env python3
    22
    3 # Requires Python 2.7+
     3# Requires Python 3+
    44
    55'''
     
    4545    sys.exit(0)
    4646
    47 input_file = sys.stdin
     47input_file = sys.stdin.buffer
    4848if options.input_file is not None:
    49     input_file = file(options.input_file, 'rb')
     49    input_file = open(options.input_file, 'rb')
    5050
    51 blob = input_file.read()
     51blob = input_file.read().rstrip(b'\r\n')
    5252
    5353specified_encodings = options.encoding_chain.split(',')
    54 sys.stdout.write(blobtools.decodeChain(specified_encodings, blob))
     54sys.stdout.buffer.write(blobtools.decodeChain(specified_encodings, blob))
Note: See TracChangeset for help on using the changeset viewer.