Here is an example through which you can put cookies in a cookiejar and read them back:
from urllib2 import Request, build_opener, HTTPCookieProcessor, HTTPHandler
#Create a CookieJar object to hold the cookies
cj = cookielib.CookieJar()
#Create an opener to open pages using the http protocol and to process cookies.
opener = build_opener(HTTPCookieProcessor(cj), HTTPHandler())
#create a request object to be used to get the page.
req = Request("http://www.about.com
f = opener.open(req)
#see the first few lines of the page
html = f.read()
#Check out the cookies
print "the cookies are: "
for cookie in cj: