02 2014 档案
摘要:python virtualenv.py flask
阅读全文
摘要:#coding:utf-8import urllib2import sysimport redef getPage(url,offset = '0'): realurl = "%s%s%s" %(url,offset,'.shtml') print realurl resp = urllib2.urlopen(realurl) content = resp.read() #print content p = re.compile(']+>') p1=re.compile('p]+>') print
阅读全文
摘要:python RE模块转自:http://blog.chinaunix.net/uid-17260303-id-2811331.html#coding:utf-8import re#match只是从头匹配字符串,search是匹配字符串的任何位置#group都是从1开始的而不是0re.match("c", "abcdef") # Nomatch Falsere.search("c", "abcdef") # Match Truereobj =re.compile("^abw*")#reobj是一
阅读全文