(self, bytestr)
| 119 | print(text) |
| 120 | |
| 121 | def _encode_binary(self, bytestr): |
| 122 | if PY3 and self._output_type == "hex": |
| 123 | return "0x%s" % str(binascii.hexlify(bytestr), 'ascii') |
| 124 | elif self._output_type == "hex": |
| 125 | return "0x%s" % binascii.hexlify(bytestr) |
| 126 | elif PY3: |
| 127 | return str(base64.b64encode(bytestr), 'ascii') |
| 128 | else: |
| 129 | return base64.b64encode(bytestr) |
| 130 | |
| 131 | def __del__(self): |
| 132 | if self.__outputFd != None: |