Package sage :: Package server :: Module introspect
[hide private]
[frames] | no frames]

Module introspect

source code


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



Functions [hide private]
 
introspect(S, query, format='html')
Return introspection from a given query string.
source code
 
_get_docstring(S, query) source code
 
_get_source_code(S, query) source code
 
_get_completions(S, query) source code
Function Details [hide private]

introspect(S, query, format='html')

source code 

Return introspection from a given query string.

INPUT:
    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!)