Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There is an env variable of sorts called EMBEDDED_MODE, I think, which is used internally to tell whether one is in the notebook.

----------------------------------------------------------------------
| Sage Version 4.6.2.alpha1, Release Date: 2011-01-20                |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
Loading Sage library. Current Mercurial branch is: plotpatches
sage: sage.plot.plot.EMBEDDED_MODE
False

But in the notebook this will give True.