Re: Redirect STDOUT [message #35426] |
Fri, 13 June 2003 09:25 |
Chad Bender
Messages: 21 Registered: July 2001
|
Junior Member |
|
|
Reimar Bauer <R.Bauer@fz-juelich.de> wrote:
: Did you have thougth on rereading the device of the terminal.
: openr,lun,'/dev/stdout',/get_lun
: Just an idea but should work
I hadn't thought of that. I'll play around with it and see if I can
get it to work.
Thanks for your help
Chad
|
|
|
Re: Redirect STDOUT [message #35427 is a reply to message #35426] |
Fri, 13 June 2003 04:04  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Chad Bender wrote:
> Reimar Bauer <R.Bauer@fz-juelich.de> wrote:
>
> : Does it help to set the xterm always in foregrund.
> : I don't understand why you are using print and not a widget for the output?
> : There are several available, Something like dialog_message or a text widget,
>
> Setting the xterm to the foreground is not much of a help, as
> it just covers up part of the widget. As for using a text
> widget, that is what I would really like to do. The main program
> is calling a bunch of distinct subroutines that are already
> written and being used for other things. They were designed
> for use at the command line, and use print or message,/info
> statements to provide feedback to the user. Now when I
> call them from my widget routine, their messages naturally
> are displayed in the xterm as normal. What I really want is
> someway to either redirect all STDOUT output to a text widget,
> or else to a string array which I could then continuously dump
> to a text widget. Unfortunately, I don't think anything like
> this exists.
>
Did you have thougth on rereading the device of the terminal.
openr,lun,'/dev/stdout',/get_lun
Just an idea but should work
Reimar
> The only way I see of getting what I want is to make separate
> versions of all the subroutines I call, which are designed to
> display their output to a text widget. That is not a very
> attractive prospect, and if it is the only option, I'll
> probably just be content to have to switch back and forth
> between the xterm and the top widget.
>
> Chad
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|
Re: Redirect STDOUT [message #35432 is a reply to message #35427] |
Thu, 12 June 2003 21:25  |
Chad Bender
Messages: 21 Registered: July 2001
|
Junior Member |
|
|
Reimar Bauer <R.Bauer@fz-juelich.de> wrote:
: Does it help to set the xterm always in foregrund.
: I don't understand why you are using print and not a widget for the output?
: There are several available, Something like dialog_message or a text widget,
Setting the xterm to the foreground is not much of a help, as
it just covers up part of the widget. As for using a text
widget, that is what I would really like to do. The main program
is calling a bunch of distinct subroutines that are already
written and being used for other things. They were designed
for use at the command line, and use print or message,/info
statements to provide feedback to the user. Now when I
call them from my widget routine, their messages naturally
are displayed in the xterm as normal. What I really want is
someway to either redirect all STDOUT output to a text widget,
or else to a string array which I could then continuously dump
to a text widget. Unfortunately, I don't think anything like
this exists.
The only way I see of getting what I want is to make separate
versions of all the subroutines I call, which are designed to
display their output to a text widget. That is not a very
attractive prospect, and if it is the only option, I'll
probably just be content to have to switch back and forth
between the xterm and the top widget.
Chad
|
|
|
Re: Redirect STDOUT [message #35438 is a reply to message #35432] |
Thu, 12 June 2003 13:26  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Chad Bender wrote:
> Is is possible to redirect the output that normally is sent
> to my xterm to somewhere else, like a string array?
> I'm writing a widget program where the top level widget is
> large enough that both it and the xterm won't fit on the
> screen. So the xterm gets covered up, and the user
> has to switch back and forth to see what IDL is printing.
Dear Chad,
Does it help to set the xterm always in foregrund.
I don't understand why you are using print and not a widget for the output?
There are several available, Something like dialog_message or a text widget,
>
> I'm really looking for some all encorporating system variable that
> I can set at the beginning of the program. I realize I could
> get most of what I want by changing print statements, and other
> tricks. But as the program is already almost completely written,
> I'd rather not have to go back and alter every print command.
> Additionally, there are some cases where I'm calling other routines,
> and changing things there is not an option.
>
> A question similar to this was asked back in 98, and I think the
> conclusion then was that is not possible. My hope is that something
> has changed since then.
I believe this doesn't change.
>
> Thanks
> Chad Bender
Reimar
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|