Hi
I have implemented a GUI using PyQt4/python3, which allows the user to
select a few files as command-line arguments. When I hit "OK" button, my
application runs and the output text is displayed on the terminal where I
run the python script. I would like to redirect this text to a TextEdit
window I have created on the GUI:

self.textEdit = QtGui.QTextEdit(Form)
self.textEdit.setGeometry(QtCore.QRect(10, 300, 421, 141))
self.textEdit.setObjectName(_fromUtf8("textEdit"))

Do you have any suggestions/tips as to how I can accomplish this task?
Using some suggestions online,  I tried creating a QProcess object and
connect the signal to a function which  reads the std output. But I don't
know how to set the arguments to the call "process.start".

self.process = QtCore.QProcess()
QtCore.QObject.connect(self.process, QtCore.SIGNAL("readyReadStdout()"),
self.readOutput)
I know I have to call self.process.start here but am not able to find
examples of how to do it. One example online uses
"self.process.setArguments", but python3/pyQt4 doesn't seem to know about
it. Using the argument directly with process.start is not helping either.

Appreciate any pointers. If there are better ways than what I am trying to
use, appreciate that as well.

Thanks,
-SM
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to