outputstring([attrs]returns the cookie string without any http headers or javascript code exceptions if an error occurs during the parsing or generation of cookie valuesa cookieerror exception is raised http cookiejar (cookielibthe http cookiejar module provides client-side support for storing and managing http cookies in python the module is called cookielib the primary role of this module is to provide objects in which http cookies can be stored so that they can be used in conjunction with the urllib packagewhich is used to access documents on the internet for instancethe http cookiejar module can be used to capture cookies and to retransmit them on subsequent connection requests it can also be used to work with files containing cookie data such as files created by various browsers the following objects are defined by the modulecookiejar(an object that manages http cookie valuesstoring cookies received as result of http requestsand adding cookies to outgoing http requests cookies are stored entirely in memory and lost when the cookiejar instance is garbage-collected filecookiejar(filename [delayload ]creates filecookiejar instance that retrieves and stores cookie information to file filename is the name of the file delayloadif trueenables lazy access to the file that isthe file won' be read or stored except by demand mozillacookiejar(filename [delayload ]creates filecookiejar instance that is compatible with the mozilla cookies txt file lwpcookiejar(filename [delayload ]creates filecookiejar instance that is compatible with the libwww-perl set-cookie file format it is somewhat rare to work with the methods and attributes of these objects directly if you need to know their low-level programming interfaceconsult the online documentation insteadit is more common to simply instantiate one of the cookie jar objects and plug it into something else that wants to work with cookies an example of this is shown in the urllib request section of this smtplib the smtplib module provides low-level smtp client interface that can be used to send mail using the smtp protocol described in rfc and rfc this module contains number of low-level functions and methods that are described in detail in the online documentation howeverthe following covers the most useful parts of this modulef lib fl ff