|
我在cmd中运行pip.exe install pytidylib
安装完成后下载了LIBTIDY.dll放在Script文件夹中;
然后运行了这一段代码(Python基础教程上的):
from subprocess import Popen,PIPE
text=open('Exam.html').read()
tidy=Popen('tidy',stdin=PIPE,stdout=PIPE,stderr=PIPE,shell=True)
#print tidy
tidy.stdin.write(text)
tidy.stdin.close()
print tidy.stdout.read()
然后报错:
Traceback (most recent call last):
File "D:\Python27\Save\htmltext.py", line 6, in <module>
tidy.stdin.write(text)
IOError: [Errno 32] Broken pipe
请问各位大神们是哪里出错了? |
|