只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-13 22:39 践行之路 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 1、函数: def foo(debug=True): if debug: print ‘in debug modle’ print ‘done’ >>foo() >>in debug modle >>done >>foo(false) >>done 2、类 class foo(object): ve 阅读全文
posted @ 2016-06-17 19:06 践行之路 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1、标准输入输出: import sys saveout=sys.stdout#保存当前输出状态 logfile=open('E://log.txt','r')# 打开文件 sys.stdout=logfile#定义输出文件 sys.stderr=logfile#定义异常输出文件 print 'he 阅读全文
posted @ 2016-06-14 23:53 践行之路 阅读(121) 评论(0) 推荐(0) 编辑