title: saving image from website and putting it into a sqlite database in python 2.7
body: <p>I'm trying to save a photo given a URL and put it directly into a sqlite database without saving it in permanent memory. </p>
  
  <p>Currently, the code I have to save the image is:</p>
  
  <pre><code> file = urllib2.urlopen("http://www.example.com/images/image.jpg")
   output = open('filename.jpg','wb')
   output.write(file.read())
   output.close()
  </code></pre>
  
  <p>Is there a way to store it in temporary memory so it's not permanently saved?</p>
  
  <p>Once I have the file stored, how do I actually store it in the database?</p>
  
  <p>Sorry for the lack of programming terminology. </p>