Ladislav> From a web server I receive headers that is an instance of the Ladislav> class MIMETOOLS.MESSAGE. How can decode it ...
You need to call one of its header retrieval methods (there are several to choose from). For more detail, check the mimetools library reference page: http://www.python.org/doc/current/lib/module-mimetools.html and the libref page of rfc822, its base class: http://www.python.org/doc/current/lib/module-rfc822.html Ladislav> and how to extract cookies then? Assuming your mimetools.Message instance is referenced by the name "msg", you'd retrieve the Set-Cookie headers with something like: cookies = msg.getallmatchigheaders("Set-Cookie") Note that you may need to put the actual headers back together. This method returns the raw lines, including continuation lines, as separate list elements. -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/activepython