
python
yutianhuan
这个作者很懒,什么都没留下…
展开
-
python 的重定向输出到一个文件
f=open('a.txt','w') import sys old=sys.stdout #将当前系统输出储存到一个临时变量中 sys.stdout=f #输出重定向到文件 print 'Hello weird' #测试一个打印输出 sys.stdout=old #还原原系统输出 f.close() print open('a.txt','r').read()注意sys库的使用,文件位置默认位原创 2016-04-27 00:05:59 · 3408 阅读 · 0 评论 -
用python扩展包matplotlib画图
1.首先来段对matplotilb的英文简单介绍: matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplo原创 2016-05-24 17:02:24 · 1118 阅读 · 0 评论