Python quopri Module
Example
Encode bytes using quoted-printable:
import quopri
print(quopri.encodestring(b'hello=world').decode())
Try it Yourself »
Definition and Usage
The quopri module encodes and decodes data using the MIME quoted-printable format.
Use it to make mostly-ASCII data safe for email transport, escaping special bytes with =XX
hex escapes.
Members
Member | Description |
---|---|
decode() | Read quoted-printable data from a binary file and write decoded output. |
decodestring() | Return decoded bytes from quoted-printable input bytes. |
encode() | Read from a binary file and write quoted-printable output to another file. |
encodestring() | Return quoted-printable encoded bytes from input bytes. |