View Full Version : Getting stdout from applications like pdb

17th April 2012, 09:45
Hello i'm trying to get stdout from python debugger pdb.

connect(&process,SIGNAL(readyReadStandardOutput()),this,SLO T(printOutput()));
process.start("python /usr/bin/pdb tmp.py")

but unfortunaly i have no output in this case, but if i trying to do:

process.start("python /usr/bin/pdb --help")

stdout catched perfectly. How can i catch stdout from app like pdb (or gdb)?

18th April 2012, 08:41
Maybe you should try QProcess::readyReadStandardError() signal or a different command line option - at first, you must be sure there is something really printed out.

18th April 2012, 14:29
i've sured that something is printing out:

vniiem@debian-8cores-1:~/projects/py_tps$ pdb tmp.py
> /home/vniiem/projects/py_tps/tmp.py(1)<module>()
-> import math