Module binascii
[hide private]
[frames] | no frames]

Module binascii

Conversion between binary data and ASCII

Classes [hide private]
Error
Incomplete
Functions [hide private]
 
a2b_base64(...)
(ascii) -> bin.
s; Binary data of hexadecimal representation
a2b_hex(hexstr)
hexstr must contain an even number of hex digits (upper or lower case).
 
a2b_hqx(...)
ascii -> bin, done.
 
a2b_qp(...)
Decode a string of qp-encoded data
 
a2b_uu(...)
(ascii) -> bin.
 
b2a_base64(...)
(bin) -> ascii.
s; Hexadecimal representation of binary data
b2a_hex(data)
This function is also available as "hexlify()".
 
b2a_hqx(...)
Encode .hqx data
s;
b2a_qp(data, quotetabs=0, istext=1, header=0)
Encode a string using quoted-printable encoding.
 
b2a_uu(...)
(bin) -> ascii.
 
crc32(...)
(data, oldcrc = 0) -> newcrc.
 
crc_hqx(...)
(data, oldcrc) -> newcrc.
s; Hexadecimal representation of binary data
hexlify(data)
This function is also available as "hexlify()".
 
rlecode_hqx(...)
Binhex RLE-code binary data
 
rledecode_hqx(...)
Decode hexbin RLE-coded string
s; Binary data of hexadecimal representation
unhexlify(hexstr)
hexstr must contain an even number of hex digits (upper or lower case).
Function Details [hide private]

a2b_base64(...)

 

(ascii) -> bin. Decode a line of base64 data

a2b_hex(hexstr)

 

hexstr must contain an even number of hex digits (upper or lower case). This function is also available as "unhexlify()"

Returns: s; Binary data of hexadecimal representation

a2b_hqx(...)

 

ascii -> bin, done. Decode .hqx coding

a2b_uu(...)

 

(ascii) -> bin. Decode a line of uuencoded data

b2a_base64(...)

 

(bin) -> ascii. Base64-code line of data

b2a_qp(data, quotetabs=0, istext=1, header=0)

 
 Encode a string using quoted-printable encoding. 

On encoding, when istext is set, newlines are not encoded, and white 
space at end of lines is.  When istext is not set, \r and \n (CR/LF) are 
both encoded.  When quotetabs is set, space and tabs are encoded.

Returns: s;

b2a_uu(...)

 

(bin) -> ascii. Uuencode line of data

crc32(...)

 

(data, oldcrc = 0) -> newcrc. Compute CRC-32 incrementally

crc_hqx(...)

 

(data, oldcrc) -> newcrc. Compute hqx CRC incrementally

unhexlify(hexstr)

 

hexstr must contain an even number of hex digits (upper or lower case). This function is also available as "unhexlify()"

Returns: s; Binary data of hexadecimal representation