Silence the output of a shell command in Jupyter notebook

Viewed 2382

Using Jupyter Notebook, you can run shell commands, for example:

!ls -l

Meanwhile, I found myself running a shell utility that has is very verbose and has many lines of talkback as it runs.

As I iterate over this, I will eventually end up with thousands of lines of talkback in the notebook.

I know usually you can silence the output of a cell by using a ;. However this won't work:

!ls -l;

(this is a dumb example, I know, nobody would probably ever want to silence ls)

Is there any way I can silence the output of a shell command in Jupyter notebook? I don't know javascript so I don't think I'd be able to hack something together using that route...

1 Answers
Related