how to capture io:format's output using ei?

Serge Aleynikov serge@REDACTED
Tue Oct 18 13:24:40 CEST 2005


All,

Perhaps someone can point me in the right direction.  I need to ensure 
that io:format/[1,2] functions' output can get properly displayed by the 
remote rpc caller written in ei (or erl_interface).

When I run a distributed Erlang session below, the output gets captured 
correctly:

~> erl -noshell -sname t -eval \
   'rpc:call(tt@REDACTED, io, format, ["Test string~n"])' -s init 
stop
Test string
~>

However, using erl_call (written using ei) doesn't display the output. 
(Well, I know why it doesn't - by looking at the implementation of the 
'-a' option that uses ei_print_term, but it's not clear how to make sure 
that the console output gets redirected):

~> ./erl_call -sname tt@REDACTED -a 'io format ["Test string~n"]' -r
~>

Any idea how to accomplish this?

Thanks.

Serge



More information about the erlang-questions mailing list