Menu

How to redirect redirect stdout/stderr

2007-10-08
2013-05-02
  • James G. sack (jim)

    I want to capture the output to stdout and stderr, that goes to the "debugee console" (is that the right term?).

    For example without using the debugger, I might run
      python prog.py 2>prog.out2 | tee prog.out1

    How might I do this when running the winpdb?

    Regards (and thanks),
    ..jim

     
    • Nir

      Nir - 2007-10-08

      You can use the embedded debugging mode.
      Add the following line as the first line of prog.py:
      import rpdb2; rpdb2.start_embedded_debugger('some_password')

      Now, run the script normally with:
      python prog.py 2>prog.out2 | tee prog.out1 etc...

      The script will then pause and wait for you to attach from an instance of Winpdb.

       

Log in to post a comment.