Ask Your Question

See if code running in notebook?

asked 2013-05-09 17:07:00 +0200

Robert gravatar image

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.)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-09 17:39:06 +0200

tmonteil gravatar image

Yes it is possible, you can see two possibilities in this post.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-05-09 17:07:00 +0200

Seen: 612 times

Last updated: May 09 '13