Skip to content

Instantly share code, notes, and snippets.

@twobob
Created September 4, 2023 22:42
Show Gist options
  • Select an option

  • Save twobob/74a0e54a70a10d6f1f74da871b2742a3 to your computer and use it in GitHub Desktop.

Select an option

Save twobob/74a0e54a70a10d6f1f74da871b2742a3 to your computer and use it in GitHub Desktop.
make colab wrap its output
from IPython.display import HTML, display
def set_css():
display(HTML('''
<style>
pre {
white-space: pre-wrap;
}
</style>
'''))
get_ipython().events.register('pre_run_cell', set_css)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment