pycurl 是个很方便的python开源库. 是 curl c的python实现.
在使用中,可能会POST文件到服务端
演示代码如下:
#
! /usr/bin/env python
#
-*- coding: utf-8 -*-
#
By mrshelly at hotmail dot com 2007-11-19
import
pycurl
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
pf
=
[(
'
test
'
,
'
test
'
),
(
'
test2
'
, (pycurl.FORM_FILE,
'
test.py
'
, pycurl.FORM_FILE,
'
test2.py
'
)),
(
'
test3
'
, (pycurl.FORM_CONTENTS,
'
0字符的上传