06 2013 档案
摘要:import re p = re.compile("[a-z]+") m = p.match("lsdjf") m.group() re 方法/属性 match() 决定 RE 是否在字符串刚开始的位置匹配 search() 扫描字符串,找到这个 RE 匹配的位置 findall() 找到 RE 匹
阅读全文
摘要:bat 获取当前文件夹路径 1, 当前文件夹的路径 有两种方法 "%~dp0" and "%cd%" ,区别在于cd输出没有最后“\” 2, Set 后面字符串不能有空格,如 file = ... 3, 加上引号防止路径中有空格 cur_dir = "%~dp0"cur_dir2 = "%cd%"e
阅读全文
摘要:1 from xml.etree.ElementTree import ElementTree,Element 2 3 def read_xml(in_path): 4 tree = ElementTree() 5 tree.parse(in_path) 6 return tree 7 8 def write_xml(tre...
阅读全文
摘要:py2exe download: http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/ 参考: http://www.cnblogs.com/jans2002/archive/2006/09/30/519393.html setup.p
阅读全文
摘要:python 操作 excel comtypes pywin32 win32com
阅读全文

浙公网安备 33010602011771号