Multipart form encoding file upload in Python 3
Question: I was wondering if it was possible to post to a form with
`enctype='multipart/form-data'` in Python 3. I looked around and could only
find things for Python 2 (such as poster).


Answer: Use [requests](http://docs.python-requests.org/en/latest/), it supports python
3.

    
    
    import requests
    
    response = requests.post('http://httpbin.org/post', files={'file': open('filename','rb')})
    print(response.content)
    

