Capture print output

capture_output(x, ...)

Arguments

x

object to capture

...

other argument to the print function