笔记

万物寻其根,通其堵,便能解其困。
  博客园  :: 新随笔  :: 管理

2018年11月22日

摘要: import re import collections # 写将要匹配的正则 NUM = r'(?P\d+)' PLUS = r'(?P\+)' MINUS = r'(?P-)' TIMES = r'(?P\*)' DIVIDE = r'(?P/)' LPAREN = r'(?P\()' RPAREN = r'(?P\))' WS = r'(?P\s+)' # 构建compile()对象 ma... 阅读全文

posted @ 2018-11-22 23:20 草妖 阅读(332) 评论(0) 推荐(0)

摘要: xml.sax.saxutils.quoteattr() 阅读全文

posted @ 2018-11-22 22:36 草妖 阅读(464) 评论(0) 推荐(0)

摘要: # 关于html.parse.HTMLParser的使用 from html.parser import HTMLParser class MyHtmlParser(HTMLParser): # 使用“”将会被调出来 def handle_decl(self, decl): # 实现基类的方法 HTMLParser.handle_decl(self... 阅读全文

posted @ 2018-11-22 00:25 草妖 阅读(348) 评论(0) 推荐(0)