title: Upload a file-like object with Paramiko?
body: <p>I have a bunch of code that looks like this:</p>
  
  <pre><code>with tempfile.NamedTemporaryFile() as tmpfile:
      tmpfile.write(fileobj.read()) # fileobj is some file-like object
      tmpfile.flush()
      try:
          self.sftp.put(tmpfile.name, path)
      except IOError:
          # error handling removed for ease of reading
          pass
  </code></pre>
  
  <p>Is it possible to do an upload like this without having to write the file out somewhere?</p>