I would like to print into the terminal window that runs IPython Notebook and not into the cell output. Printing into cell output consumes more memory and slows down my system when I issue a substantial number of print
calls. In essence, I would like this behaviour by design.
I have tried the following:
print
and sys.stdout.write
calls Hide cell inputs If you add the tag hide-input to a cell, then Jupyter Book will hide the cell but display the outputs.
In JupyterLab select Help -> Launch classic notebook, then from your browser menu (e.g. 3 dot menu) choose print and print to pdf.
Put a ';' at the end of a line to suppress the printing of output.
To launch Jupyter Notebook App: Click on spotlight, type terminal to open a terminal window. Enter the startup folder by typing cd /some_folder_name . Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.
You have to redirect your output to the systems standard output device. This depends on your OS. On Mac that would be:
import sys
sys.stdout = open('/dev/stdout', 'w')
Type the above code in an IPython cell and evaluate it. Afterwards all output will show up in terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With