Ask Your Question

Revision history [back]

How to find if computation is in a notebook or sage prompt ?

  • Example of what is needed in sage prompt:

    sage: is_sageprompt()

    True

  • Example of what is needed in a notebook:

In an input cell: is_sagenotebook()

The output cell: True