Sage Notebook Introspection

TODO: - add support for grabbing source code from Pyrex functions (even if not perfect is better than nothing). - PNG or MathML output format for docstring

sagenb.misc.introspect.introspect(S, query, format='html')

Return introspection from a given query string.


  • S - a Sage0 object, i.e., an interface to a running instance of Python with the Sage libraries loaded
  • query - a string: - if has no ‘?’ then return completion list - if begins or ends in one ‘?’ return docstring - if begins or ends in ‘??’ return source code
  • format - (string) ‘html’, ‘png’, ‘none’ (only html is implemented right now!)

Previous topic

Support for Notebook Introspection and Setup

Next topic

This is a stand-in for Sage’s inspection code in

This Page