Why does pprint for a writer crop output?

Next snipp:

(binding [*out* (writer "foo.txt")] (pprint models)) 

Truncates output to the nearest 208 Kb. However, the following:

 (spit "foo.txt" (with-out-str (pprint models))) 

It works fine and does not truncate the output.

Why is this?

+4
source share
1 answer

Sound similar to flash issue, try the following:

 (binding [*out* (writer "foo.txt")] (pprint models) (flush)) 

flush will flush output buffers.

+4
source

All Articles