
Python
swq499809608
这个作者很懒,什么都没留下…
展开
-
python 匹配关键字
#!/usr/bin/env python #-*-coding:utf8-*- import os,sys,re def read(): os.chdir('/etc/openvpn/sn10001/etc/') files = open('server.conf','r').readlines() b = [i.strip() for原创 2012-02-21 16:59:43 · 1852 阅读 · 0 评论 -
python 读取文件最后一行
#!/usr/bin/env python #-*-coding:utf8-*- #----- william -------- import os,sys,re def readend(): os.chdir('/etc/openvpn/sn10001/etc/') files = open('server.conf','r') i = -1原创 2012-02-21 16:58:33 · 3270 阅读 · 0 评论