![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
yang524505231
这个作者很懒,什么都没留下…
展开
-
Python中有用的库
<br />StringIO:可用于stream重定向,将标准输入输出定位到,StringIO中,并通过getValue方法返回字符串<br />pdfMiner,pyPdf:用于PDF解析<br />re:正则表达式库原创 2010-11-30 16:12:00 · 356 阅读 · 0 评论 -
stdout重定向
from cStringIO import StringIO old_stdout = sys.stdout sys.stdout = mystdout = StringIO() # blah blah lots of code ... sys.stdout = old_stdout # examine mystdout.getvalue()原创 2010-11-30 16:13:00 · 704 阅读 · 1 评论