2015年8月24日

python 自动备份文件

摘要: #!/usr/bin/pythonimport osimport time#Define SOURCE_DIR = ['/root/test','/root/test1']TARGET_DIR = '/root/backup'NAME_FILE = 'auto_backup_file'DATE_... 阅读全文

posted @ 2015-08-24 23:05 侯志清 阅读(1000) 评论(0) 推荐(0) 编辑

文件读取

摘要: #!/bin/pythonimport sysf = file('mingdan.txt','w')f.write('''1 lijuan bj2 thouzhiqing IT3 zhangwu IT4 user4 45 user5 56 user6 63 ... 阅读全文

posted @ 2015-08-24 15:01 侯志清 阅读(168) 评论(0) 推荐(0) 编辑

While循环

摘要: import sysuser="houzhiqing"while True: for i in range(0,3): username = raw_input("please input your name:").strip() if len(username)... 阅读全文

posted @ 2015-08-24 14:53 侯志清 阅读(145) 评论(0) 推荐(0) 编辑

导航