How to get the cookies saved in a file by using python?
<p>I have two methods </p>

<pre><code>  def save_cookie(): 
      cookie = cookielib.MozillaCookieJar('cookie.txt') 
      opener = urllib2.build_opener(HTTPCookieProcessor(cookie)) 
      req = urllib2.Request(url=targeturl,headers=targetheaders) 
      opener.open(req) 
      cookie.save(ignore_discard=True,ignore_expires=True) 

  def get_cookie(): 
      cookie = cookielib.MozillaCookieJar() 
      print cookie.load(filename='cookie.txt').name
</code></pre>

<p>the first method is saving the cookies in a file from response.
I want to use the second method to get the cookies from the file,
but the type of <strong>cookie.load(filename='cookie.txt')</strong> is None
so... </p>
