I\'m interested in writing a short python script which uploads a short binary file (.wav/.raw audio) via a POST request to a remote server.
I\'ve done this with pycurl,
How's urllib substantially more verbose? You build postdict basically the same way, except you start with
postdict = [ ('userfile', open(wavfile, 'rb').read()) ]
Once you vave postdict,
resp = urllib.urlopen(url, urllib.urlencode(postdict))
and then you get and save resp.read()
and maybe unquote and try JSON-loading if needed. Seems like it would be actually shorter! So what am I missing...?