retrieve "puts" command result from C



Hi all,

I want to retrieve the string displayed by the "puts" command from the
C api.
e.g:

$ puts "something"
something

How can I get the string "something" from C ?

Note: I already try Tcl_GetStringFromObj that always returns an empty
string. And Tcl_WriteObj that only display on a channel and not in a
char*.

Fabrice

.



Relevant Pages