03 2016 档案

摘要:原文地址:http://mysrc.sinaapp.com/view_note/?id=395 阅读全文
posted @ 2016-03-31 09:04 Jarning_Gau 阅读(322) 评论(0) 推荐(0)
摘要:os.sep 可以取代操作系统特定的路径分隔符。windows下为 '\\' os.name 字符串指示你正在使用的平台。比如对于Windows,它是'nt',而对于Linux/Unix用户,它是 'posix' os.getcwd() 函数得到当前工作目录,即当前Python脚本工作的目录路径 o 阅读全文
posted @ 2016-03-29 18:28 Jarning_Gau 阅读(753) 评论(0) 推荐(0)
摘要:import shutil with open('/path/to/file', 'r') as f: with open('/path/to/file.new', 'w') as g: for line in f.readlines(): if '/local/server' not in line: ... 阅读全文
posted @ 2016-03-29 16:26 Jarning_Gau 阅读(1474) 评论(0) 推荐(0)
摘要:from itertools import islice input_file = open(file_name) for line in islice(input_file, 1, None): do_readline() 原文地址:http://blog.csdn.net/vernice/art 阅读全文
posted @ 2016-03-29 15:38 Jarning_Gau 阅读(874) 评论(0) 推荐(0)
摘要:今天在VM10下重装了Ubuntu14.10,安装vim时发现如下问题 谷歌了一下,终于找到一种方法解决。 终端下: sudo vi /etc/apt/source.list 该命令将用vi打开一个文件,在改文件中编辑添加: deb http://cz.archive.ubuntu.com/ubun 阅读全文
posted @ 2016-03-28 20:04 Jarning_Gau 阅读(831) 评论(0) 推荐(0)