# find the day of the week of a given date # Python will trap impossible dates like (1900,…
# show a jpeg (.jpg) image using wxPython, newer coding style # two different ways to load…
python十进制转二进制,可指定位数 # convert a decimal (denary, base 10) integer to a binary string (base…
arr = [1,2,3,4,5,6,7,8,9,10]; def search(someone, arr): l = -1; h = len(arr); while l + 1 …
上线需要,将py的源码中注释删掉,然后编译成字节码。写此脚本主要是为了删除注释。当然如果上线不想放py源码,则在最后增加删除源码即可。 #!/bin/env python # -*…
python提取页面内的url列表 from bs4 import BeautifulSoup import time,re,urllib2 t=time.time() websi…
from ctypes import * import time import win32file run = True logfile = open('.\\log.out','…
python正则表达式提取网页URL import re import urllib url="http://www.open-open.com" s=urll…
#!/usr/bin/env python import sys def search2(a,m): low = 0 high = len(a) - 1 while(low <…
#coding:utf-8 ''' python图片处理 @author:fc_lamp @blog:http://fc-lamp.blog.163.com/ ''' import…
python编写的用于测试网站访问速率的代码片段,可以输出打开某url的时间,访问100次的平均时间,最大时间和最小时间等等 def Process(url,n): minSpan…
python提取url中的域名和端口号 import urllib proto, rest = urllib.splittype("http://www.open-ope…