Thebinascii module contains a number of methods to convertbetween binary and various ASCII-encoded binaryrepresentations. Normally, you will not use these functions directlybut use wrapper modules likeuu,base64, orbinhex instead. Thebinascii modulecontains low-level functions written in C for greater speedthat are used by the higher-level modules.
Thebinascii module defines the following functions:
| string) |
| data) |
| string) |
| data) |
| string[, header]) |
| data[, quotetabs, istext, header]) |
| string) |
| data) |
0x90 after a byte as a repeatindicator, followed by a count. A count of0 specifies a bytevalue of0x90. The routine returns the decompressed data,unless data input data ends in an orphaned repeat indicator, in whichcase theIncomplete exception is raised.| data) |
| data) |
| data, crc) |
| data[, crc]) |
print binascii.crc32("hello world") # Or, in two pieces: crc = binascii.crc32("hello") crc = binascii.crc32(" world", crc) print crc| data) |
| data) |
| hexstr) |
| hexstr) |
See Also: