comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Capturing stdoutput
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Capturing stdoutput [message #11826 is a reply to message #11636] Fri, 22 May 1998 00:00 Go to previous message
Alex Schuster is currently offline  Alex Schuster
Messages: 124
Registered: February 1997
Senior Member
Bernard Puc wrote:

> I am looking for ideas on how to implement the following: I have a
> widget application and I want to display whatever output various
> procedures/functions usually write to the output log window in a text
> window in the application. Any hints are welcome.

Any hints? Okay, then you could do a find and replace in each .pro file
your program needs, and replace print with printlog where printlog is a
procedure like this:

pro printlog var1, var2, var3, var4, var5, var6, var7, var8, var9, var10
text = ''
for i = 1, n_params() do $
foo = execute( 'text=text+string(var' + strtrim( i, 1 ) + ')' )
widget_control, log_id, /append, set_value=text
end

I concatenates all the given parameters to one string, and appends it in
the log widget. This worked fine for me, but if you cannot modify the
routines, or if they are written in C/Fortran, it wouldn't help you.

You can redirect the complete output by starting IDL via 'idl >
logfile', but you cannot access this file in IDL because it has be be
closed first.

Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Q: A good way to interrupt and kill procedures?
Next Topic: Euclidean distance

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 19:37:51 PDT 2025

Total time taken to generate the page: 0.31667 seconds