title: Python mechanize: Submitting a form with a file (image)?
body: <p>There's a form with the following control (it's an upload image control)</p>
  
  <pre><code>&lt;FileControl(profile_image=&lt;No files added&gt;)&gt;
  </code></pre>
  
  <p>What am I supposed put in the "??????????": </p>
  
  <pre><code>br = mechanize.Browser()
  br.open(mywebsite)
  br.select_form(nr=1)
  br.form['profile_image'] = ??????????
  br.submit()
  </code></pre>
  
  <p>I've tried</p>
  
  <pre><code>   br.form['profile_image'] = open("img.jpg")
  </code></pre>
  
  <p>but get the error</p>
  
  <pre><code>  File "/usr/local/lib/python2.6/dist-packages/mechanize-0.2.4-py2.6.egg/mechanize/_form.py", line 2784, in __setitem__
      raise ValueError(str(e))
  ValueError: value attribute is readonly
  </code></pre>