I want to display on a list of the packages I am using or importing. I know this command
wll print the list on the screen, but with other items I am not interested in. So I would like to capture what is printed on the screen as a string, clean it up, and then store it in a String variable.
I tried to do this
captured_string = "$(Pkg.status())"
captured_string turned out to be the string “nothing.”
Is there a way to capture what is printed by this command?
Note: the question is not specific to
Pkg.status(). I would like to be able to capture what is printed on the screen by any Julia command.