On Sun, 2007-10-14 at 01:42 +0100, Paulino wrote: > Hello! > > > How can I upload a file from python? > > If it is a form to fill with values it's simple: > > > urlopen("http://site.com/action?key1=value1;key2=value2") and I get the > form filled. > > > What about uploading a file programmaticaly?
Google tells me that urllib2 does not support file uploads properly, however it also tells me that one can use httplib directly to do it: http://wiki.forum.nokia.com/index.php/How_to_upload_a_file_to_server_with_application/x-www-form-urlencoded -davidc -- gpg-key: http://www.zettazebra.com/files/key.gpg
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor