title: Python PIL NameError global name Image is not defined
body: <p>I installed PIL 1.1.7 using the executable for Python 2.7. But when I run this code :</p>
  
  <pre><code>import requests
  from PIL import *
  
  def main() :
      target = "http://target/image.php" #returns binary data for a PNG.
      cookies = {"mycookie1", "mycookie2"}
      r = requests.get(target, cookies=cookies)
      im = Image.open(r.content) #r.content contains binary data for the PNG.
      print im
  
  if __name__ == "__main__" :
      main()
  </code></pre>
  
  <p>It gives the error :</p>
  
  <pre><code>Traceback (most recent call last):
  File "D:\Programming\Python\code\eg_cc1.py", line 17, in &lt;module&gt;
    main()
  File "D:\Programming\Python\code\eg_cc1.py", line 13, in main
    im = Image.open(r.content)
  NameError: global name 'Image' is not defined
  </code></pre>
  
  <p>I installed PIL in <code>Lib\site-packages</code>.</p>