AlkantarClanX12

Your IP : 3.141.2.191


Current Path : /proc/thread-self/root/opt/hc_python/share/doc/pycurl/examples/quickstart/
Upload File :
Current File : //proc/thread-self/root/opt/hc_python/share/doc/pycurl/examples/quickstart/file_upload_real.py

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'https://httpbin.org/post')

c.setopt(c.HTTPPOST, [
    ('fileupload', (
        # upload the contents of this file
        c.FORM_FILE, __file__,
    )),
])

c.perform()
c.close()