分享知识的快乐,尊重他人创造的知识 注册 | 登陆
浏览模式: 标准 | 列表2010年05月的文章

如何制作python的插件扩展包括msi

如何制作python的插件扩展包括msi

这里有一篇文章详细介绍,需要请参考阅读。

http://curl.haxx.se/mail/curlpython-2009-11/0010.html

» 阅读全文

Tags: msi, python

pycurl for python2.6 on windows

Tags: pycurl

urllib的urlretrieve

urllib的urlretrieve

参数4个 (urllib.urlretrieve = urlretrieve(url, filename=None, reporthook=None, data=None))

url: 你要下载的网址

reporthook:这个函数要指定三个参数,对数据流进行自己理。如:

def reporthook(blocks_read, block_size, total_size): 
    if not blocks_read: 
        print ('Connection opened') 
    if total_size < 0: 
        print ('Read %d blocks' % blocks_read) 
    else:
        print('downloading:%d MB, totalsize:%d MB' % (blocks_read*block_size/1048576.0,total_size/1048576.0))
   

filename :你要保存的文件

 

data:指定 以后会POST提交,记得格式如:str=1&str=2.可用urllib.urlencode函数包装

» 阅读全文

Tags: urllib

point 比 putpixel来的快 PIL for python

point  比 putpixel来的快 PIL for python

» 阅读全文