Results 1 to 3 of 3

Thread: Getting stdout from applications like pdb

  1. #1
    Join Date
    Apr 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Getting stdout from applications like pdb

    Hello i'm trying to get stdout from python debugger pdb.


    Qt Code:
    1. connect(&process,SIGNAL(readyReadStandardOutput()),this,SLOT(printOutput()));
    2. process.start("python /usr/bin/pdb tmp.py")
    To copy to clipboard, switch view to plain text mode 

    but unfortunaly i have no output in this case, but if i trying to do:
    Qt Code:
    1. process.start("python /usr/bin/pdb --help")
    To copy to clipboard, switch view to plain text mode 

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

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Getting stdout from applications like pdb

    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.

  3. #3
    Join Date
    Apr 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Getting stdout from applications like pdb

    i've sured that something is printing out:

    Qt Code:
    1. vniiem@debian-8cores-1:~/projects/py_tps$ pdb tmp.py
    2. > /home/vniiem/projects/py_tps/tmp.py(1)<module>()
    3. -> import math
    4. (Pdb)
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QTextStream with stdout
    By fyodor in forum Newbie
    Replies: 3
    Last Post: 4th December 2011, 00:05
  2. How to get the STDOUT from a QTestLib DLL?
    By entonjackson in forum Qt Programming
    Replies: 6
    Last Post: 19th October 2011, 09:02
  3. Using the Stdout reading in QProcess
    By DiegoTc in forum Newbie
    Replies: 12
    Last Post: 10th July 2011, 07:36
  4. Cannot get stdout from QProcess
    By johnny_sparx in forum Qt Programming
    Replies: 11
    Last Post: 3rd March 2006, 11:46
  5. fstream -> stdout
    By zlatko in forum General Programming
    Replies: 11
    Last Post: 25th January 2006, 05:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.