Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I use this to check whether one is running in the notebook or not

if sage.misc.latex.EMBEDDED_MODE: # If in the notebook
    # do something specific to notebook
else:
    # do something that is possible in command line,
    # like carriage returns :)