Sage Reference Manual
Interpreter Interfaces1======================23Sage provides a unified interface to the best computational4software. This is accomplished using both C-libraries (see5`C/C++ Library Interfaces <../libs/index.html>`_)6and interpreter interfaces, which are7implemented using pseudo-tty's, system files, etc. This chapter is8about these interpreter interfaces.910.. note::1112Each interface requires that the corresponding software is13installed on your computer. Sage includes GAP, PARI, Singular, and14Maxima, but does not include Octave (very easy to install), MAGMA15(non-free), Maple (non-free), or Mathematica (non-free).161718There is overhead associated with each call to one of these19systems. For example, computing ``2+2`` thousands of times using20the GAP interface will be slower than doing it directly in21Sage. In contrast, the C-library interfaces of22`C/C++ Library Interfaces <../libs/index.html>`_23incur less overhead.242526In addition to the commands described for each of the interfaces27below, you can also type e.g., ``%gap``,28``%magma``, etc., to directly interact with a given29interface in its state. Alternatively, if ``X`` is an30interface object, typing ``X.interact()`` allows you to31interact with it. This is completely different than32``X.console()`` which starts a complete new copy of33whatever program ``X`` interacts with. Note that the34input for ``X.interact()`` is handled by Sage, so the35history buffer is the same as for Sage, tab completion is as for36Sage (unfortunately!), and input that spans multiple lines must be37indicated using a backslash at the end of each line. You can pull38data into an interactive session with ``X`` using39``sage(expression)``.4041The console and interact methods of an interface do very different42things. For example, using gap as an example:434445#. ``gap.console()``: You are completely using another46program, e.g., gap/magma/gp Here Sage is serving as nothing more47than a convenient program launcher, similar to bash.4849#. ``gap.interact()``: This is a convenient way to50interact with a running gap instance that may be "full of" Sage51objects. You can import Sage objects into this gap (even from the52interactive interface), etc.535455The console function is very useful on occasion, since you get the56exact actual program available (especially useful for tab completion57and testing to make sure nothing funny is going on).5859.. toctree::60:maxdepth: 26162sage/interfaces/interface63sage/interfaces/expect64sage/interfaces/sagespawn65sage/interfaces/axiom66sage/interfaces/ecm67sage/interfaces/four_ti_268sage/interfaces/fricas69sage/interfaces/frobby70sage/interfaces/gap71sage/interfaces/gap372sage/interfaces/gfan73sage/interfaces/giac74sage/interfaces/gnuplot75sage/interfaces/gp76sage/interfaces/jmoldata77sage/interfaces/kash78sage/interfaces/lie79sage/interfaces/lisp80sage/interfaces/macaulay281sage/interfaces/magma82sage/interfaces/magma_free83sage/interfaces/maple84sage/interfaces/mathematica85sage/interfaces/matlab86sage/interfaces/maxima87sage/interfaces/maxima_abstract88sage/interfaces/maxima_lib89sage/interfaces/mupad90sage/interfaces/mwrank91sage/interfaces/octave92sage/interfaces/phc93sage/interfaces/povray94sage/interfaces/psage95sage/interfaces/qepcad96sage/interfaces/qsieve97sage/interfaces/r98sage/interfaces/rubik99sage/interfaces/sage0100sage/interfaces/scilab101sage/interfaces/singular102sage/interfaces/tachyon103sage/interfaces/tides104105sage/interfaces/cleaner106sage/interfaces/quit107sage/interfaces/read_data108109.. include:: ../footer.txt110111112