See if code running in notebook?
Is it possible for code to check if it's being run from the Notebook or from the Interactive Shell? (I want to format the output differently in the two cases.)
Is it possible for code to check if it's being run from the Notebook or from the Interactive Shell? (I want to format the output differently in the two cases.)
Yes it is possible, you can see two possibilities in this post.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2013-05-09 17:07:00 +0100
Seen: 650 times
Last updated: May 09 '13
Profiling code in the Sage notebook
Notebook List Object Data Storage/Retrieval? (Start/Restart)
Short Cython Example In A Notebook Cell?
What happens in insecure mode?
Is notebook() mutually-exclusive from "./sage -gdb" mode?
Can I pause a computation rather than aborting it? (Interrupt Command)
What state is preserved when I close a running notebook browser window?