[PyKDE] [eric3] redirect stdin/out/err
detlev at die-offenbachs.de
Fri Jul 15 17:19:42 BST 2005
Am Mittwoch, 13. Juli 2005 10:51 schrieb Guest007:
> > If your program throws an exception, that should be shown by eric3. If it
> > isn't please try to create a test script, that shows the observed
> > behaviour and send it to me.
> small test script
> from sqlobject import *
> import datetime
> conn = 'sqlite:/:memory:'
> __connection__ = conn
> class test1(SQLObject):
> t = test1(date=datetime.datetime(1800,1,1))
> print t.date
> 1) If in datetime.datetime(1800,1,1) I'll set a correct date (>1900), than
> I can see output in _Shell_ window if
> Settings->Preferences->Debugger->Python->Redirect stdin/stdout/stderr is
> set. If this check box not set -- I don't see my stdout anywere in GUI
> (only in text console, if I start eric3 by hand). Log-Viewer always empty.
That is the correct behavior. If you select the Console Debugger on
the ...Debugger->General page, the program will be started it's own shell and
you will see the output there, if the redirect checkbox is unchecked.
> 2) If I run provided script as-is -- it trows an exception. This exception
> trown by SQLObject due to incorrect date.
> 2.1) stdout and stderr in Log-Viewer are still empty.
> 2.2) No one place in system, where I can find full content of trown
> exception 2.3) I receive window (look at picture). I'm send screenshot
> because I can't select this text! This window don't show me a real place of
> mistake, don't give me a full text of exception, don't give me a chance to
> select, which file/line I want to see after press button.
> 2.4) Automatically opens a pointed file (converters.py) and cursor placed
> in line 180. I must return to my script by hand and try to nick, where is
That is the intended behavior. If you select "Break", the suspect file is
loaded and the line given in the exception is highlighted. The local variable
tab is made active as well. This tab contains a combo box at the top, which
shows you the stack trace of the exception. If you select a new stack frame,
you will see the local variables of this frame and pressing the "Source"
button will load the file of the currently selected stack frame and position
the cursor at the line in question. All exception information is recorded in
the exception tab as a tree.
I hope, that this gives answers to your "problems".
> 3) I'm propose:
> 3.1) Return functionality of Log-Viewer
> 3.2) remake error window to be
> 3.2.1) optional
> 3.2.2) contained full text of exception with interaction (selectable,
> clickable) and with ability to decide, which file/line will opens after
> press button.
> Thank you, Detlev, for your great job! Hope eric3 will be better and
> > Detlev
detlev at die-offenbachs.de
More information about the PyQt