Erlang shell print depth and print length: how to change?

Ulf Wiger etxuwig@REDACTED
Tue Feb 6 10:56:29 CET 2001


On Mon, 5 Feb 2001, Arthur Reyes wrote:

>Dear Erlang Friend:
>
>I need to inspect Erlang abstract syntax trees (ASTs) produced by
>epp:parse_file/3 and similar functions.
>
>When given the filename and path of a large Erlang source code file,
>epp:parse_file/3 returns a long list of deeply nested tuples.
>
>The returned list is often so long the Erlang shell elides the end
>of it with ellipses (...). The tuples are often so deeply nested the
>Erlang shell elides the deeper components with ellipses as well.
>
>If you know, please provide me a reference to modules and functions
>that allow the user of the Erlang shell to modify the shell's print
>depth and print length.


What I usually do is this:



{ok, Fd} = file:open("tempfile.txt", [write]),
io:fwrite(Fd, "~p~n", [epp:parse_file(...)]),
file:close(Fd).


Then, I inspect the result using less or Emacs.


/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list