Answer the question
In order to leave comments, you need to log in
How to give os.system output in plainTextEdit?
self.plainTextEdit.setPlainText(os.system("my.exe "+self.lineEdit.text()))
Traceback (most recent call last):
File "d:\python\gui\outputpyfile.py", line 77, in buttonClicked1
self.plainTextEdit.paste(os.system("my.exe "+self.lineEdit.text() ))
TypeError: paste(self): too many arguments
Answer the question
In order to leave comments, you need to log in
Solution :
stream = os.popen("my.exe "+self.lineEdit.text())
self.plainTextEdit.setPlainText(stream.read())
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question