# zipping and unzipping a string using the zlib module # a very large string could be zipp…
# 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…
#Welcome to My blog #www.suzhengpeng.com def listPrint(listName): for fstItem in listName:…
import re import os import urllib.request home = "http://www.gamersky.com/ent/wp/" i_coun…
python统计文本字符串里面单词出现的频率 # word frequency in a text # tested with Python24 vegaseat 25aug200…
上线需要,将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 <…