opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cookies),
    MultipartPostHandler.MultipartPostHandler)
path_to_file = 'abc.zip'
open_file = open(path_to_file, 'rb')
param = {'file': open_file}
req = opener.open('http://www.yoursite.com/uploadfile', param)
open_file.close()
Selenium: Upload file in Google Chrome