Skip to content

Conversation

@gjvnq
Copy link

@gjvnq gjvnq commented Dec 18, 2021

Basically, icecream will now automatically output to stdout if any of the following is true:

  1. The environment variable PYTHON_ICECREAM_USE_STDOUT evaluates to true.
  2. The code is running from inside Jupyter.

@gruns
Copy link
Owner

gruns commented Jan 9, 2022

thank you for this PR!

why use stdout over stderr inside jupyter?

@gjvnq
Copy link
Author

gjvnq commented Jan 9, 2022 via email

@alexmojaki
Copy link
Collaborator

Related discussion: #77 (comment)

@gjvnq Why not use the isnotebook you put there? IPython is a lot more general than Jupyter notebooks.

Another way to detect Jupyter is described here: #100 (comment)

Apparently disabling colorama in Jupyter would be good too.

On another note, PYTHON_ICECREAM_USE_STDOUT is very wordy for a library all about convenience. IC_STDOUT seems sufficiently unique.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants