internet data handling and encoding it is fairly common to see this format used when documents make use of special characters in the extended ascii character set for exampleif document contained the text "copyright ( "this might be represented by the python byte string 'copyright \xa the quoted-printed version of the string is 'copyright = where the special character '\xa has been replaced by the escape sequence '= decode(inputoutput [header]decodes bytes into quopri format input and output are file objects opened in binary mode if header is truethen the underscore (_will be interpreted as space otherwiseit is left alone this is used when decoding mime headers that have been encoded by defaultheader is false decodestring( [header]decodes string may be unicode or byte stringbut the result is always byte string header has the same meaning as with decode(encode(inputoutputquotetabs [header]encodes bytes into quopri format input and output are file objects opened in binary mode quotetabsif set to trueforces tab characters to be quoted in addition to the normal quoting rules otherwisetabs are left as is by defaultquotetabs is false header has the same meaning as for decode(encodestring( [quotetabs [header]]encodes byte string the result is also byte string quotetabs and header have the same meaning as with encode(notes the quoted-printable data encoding predates unicode and is only applicable to -bit data even though it is most commonly applied to textit really only applies to ascii and extended ascii characters represented as single bytes when you use this modulemake sure all files are in binary mode and that you are working with byte strings xml package python includes variety of modules for processing xml data the topic of xml processing is largeand covering every detail is beyond the scope of this book this section assumes the reader is already familiar with some basic xml concepts book such as inside xml by steve holzner (new ridersor xml in nutshell by elliotte harold and scott means ( 'reilly and associateswill be useful in explaining basic xml concepts several books discuss xml processing with python including python xml by christopher jones ( 'reilly and associatesand xml processing with python by sean mcgrath (prentice hallpython provides two kinds of xml support firstthere is basic support for two industry-standard approaches to xml parsing--sax and dom sax (simple api for xmlis based on event handling where an xml document is read sequentially and as xml elements are encounteredhandler functions get triggered to perform processing dom (document object modelbuilds tree structure representing an entire xml lib fl ff