title: Post picture to Tumblr using Python
body: <p>I'm trying to post a picture to tumblr, using python, in particular: <a href="http://code.google.com/p/python-tumblr/" rel="nofollow">http://code.google.com/p/python-tumblr/</a></p>
  
  <p>#!/usr/bin/python</p>
  
  <pre><code>from tumblr import Api
  import sys
  
  BLOG='example.tumblr.com'
  USER='example@example.com'
  PASSWORD='example'
  api = Api(BLOG,USER,PASSWORD)
  post_data = "picture.png"   
  title = "Title of my entry"
  body = "this is a story with a picture"
  
  api.write_regular(title, body + post_data)
  </code></pre>
  
  <p>When I run this the result is that the blog arrives, but instead of:</p>
  
  <blockquote>
    <p>Title of my entry</p>
    
    <p>this is a story with a picture</p>
    
    <p>[img]</p>
  </blockquote>
  
  <p>I get this:</p>
  
  <blockquote>
    <p>Title of my entry</p>
    
    <p>this is a story with a
    picturepicture.png</p>
  </blockquote>