(newbie) storing outputs from all lines of procs into a string
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

(newbie) storing outputs from all lines of procs into a string

From: <just80n@gmail.com>
Date: Mon Dec 19 2005 - 15:40:58 CET

Hello all!

I have a custom interpreter which people will feed with groups of
custom commands (procs ...). [I don't have power over the contents of
the procs, but I can do smthg after or before each one]

a proc looks typically like this :

proc gimmedat {} {
puts [date_fc -d]
bid_uch_pinct ab
puts [date_fc -h]
bid_uch_pinct cd
puts [date_fc -d]
bid_uch_pinct ef
puts [date_fc -h]
}

I'd like to grabb ALL the results outputed by a proc into a single
string and send this to another place via a socket...

For the moment , I use Tcl_GetStringResult(getinterp()) from within C
to get the result but I logically get the last one (which is btw empty
for "puts")...

Is there a way to obtain what I want? (From the Tcl code or from the
C)

Thank you!
Received on Fri Dec 23 19:02:09 2005