只有注册用户登录后才能阅读该文。 阅读全文
摘要:
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 阅读全文
摘要:
1、标准输入输出: import sys saveout=sys.stdout#保存当前输出状态 logfile=open('E://log.txt','r')# 打开文件 sys.stdout=logfile#定义输出文件 sys.stderr=logfile#定义异常输出文件 print 'he 阅读全文