**
python捕获cmd输出内容方法**
import sys from PyQt5.QtWidgets import QWidget out=sys.stdout sys.stdout=open(r'E:QWidget.txt','w') help(QTabelWidget) sys.stdout.close() sys.stdout=out

**
python捕获cmd输出内容方法**
import sys from PyQt5.QtWidgets import QWidget out=sys.stdout sys.stdout=open(r'E:QWidget.txt','w') help(QTabelWidget) sys.stdout.close() sys.stdout=out