Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Sage Reference Manual

732393 views
1
Interpreter Interfaces
2
======================
3
4
Sage provides a unified interface to the best computational
5
software. This is accomplished using both C-libraries (see
6
`C/C++ Library Interfaces <../libs/index.html>`_)
7
and interpreter interfaces, which are
8
implemented using pseudo-tty's, system files, etc. This chapter is
9
about these interpreter interfaces.
10
11
.. note::
12
13
Each interface requires that the corresponding software is
14
installed on your computer. Sage includes GAP, PARI, Singular, and
15
Maxima, but does not include Octave (very easy to install), MAGMA
16
(non-free), Maple (non-free), or Mathematica (non-free).
17
18
19
There is overhead associated with each call to one of these
20
systems. For example, computing ``2+2`` thousands of times using
21
the GAP interface will be slower than doing it directly in
22
Sage. In contrast, the C-library interfaces of
23
`C/C++ Library Interfaces <../libs/index.html>`_
24
incur less overhead.
25
26
27
In addition to the commands described for each of the interfaces
28
below, you can also type e.g., ``%gap``,
29
``%magma``, etc., to directly interact with a given
30
interface in its state. Alternatively, if ``X`` is an
31
interface object, typing ``X.interact()`` allows you to
32
interact with it. This is completely different than
33
``X.console()`` which starts a complete new copy of
34
whatever program ``X`` interacts with. Note that the
35
input for ``X.interact()`` is handled by Sage, so the
36
history buffer is the same as for Sage, tab completion is as for
37
Sage (unfortunately!), and input that spans multiple lines must be
38
indicated using a backslash at the end of each line. You can pull
39
data into an interactive session with ``X`` using
40
``sage(expression)``.
41
42
The console and interact methods of an interface do very different
43
things. For example, using gap as an example:
44
45
46
#. ``gap.console()``: You are completely using another
47
program, e.g., gap/magma/gp Here Sage is serving as nothing more
48
than a convenient program launcher, similar to bash.
49
50
#. ``gap.interact()``: This is a convenient way to
51
interact with a running gap instance that may be "full of" Sage
52
objects. You can import Sage objects into this gap (even from the
53
interactive interface), etc.
54
55
56
The console function is very useful on occasion, since you get the
57
exact actual program available (especially useful for tab completion
58
and testing to make sure nothing funny is going on).
59
60
.. toctree::
61
:maxdepth: 2
62
63
sage/interfaces/interface
64
sage/interfaces/expect
65
sage/interfaces/sagespawn
66
sage/interfaces/axiom
67
sage/interfaces/ecm
68
sage/interfaces/four_ti_2
69
sage/interfaces/fricas
70
sage/interfaces/frobby
71
sage/interfaces/gap
72
sage/interfaces/gap3
73
sage/interfaces/gfan
74
sage/interfaces/giac
75
sage/interfaces/gnuplot
76
sage/interfaces/gp
77
sage/interfaces/jmoldata
78
sage/interfaces/kash
79
sage/interfaces/lie
80
sage/interfaces/lisp
81
sage/interfaces/macaulay2
82
sage/interfaces/magma
83
sage/interfaces/magma_free
84
sage/interfaces/maple
85
sage/interfaces/mathematica
86
sage/interfaces/matlab
87
sage/interfaces/maxima
88
sage/interfaces/maxima_abstract
89
sage/interfaces/maxima_lib
90
sage/interfaces/mupad
91
sage/interfaces/mwrank
92
sage/interfaces/octave
93
sage/interfaces/phc
94
sage/interfaces/povray
95
sage/interfaces/psage
96
sage/interfaces/qepcad
97
sage/interfaces/qsieve
98
sage/interfaces/r
99
sage/interfaces/rubik
100
sage/interfaces/sage0
101
sage/interfaces/scilab
102
sage/interfaces/singular
103
sage/interfaces/tachyon
104
sage/interfaces/tides
105
106
sage/interfaces/cleaner
107
sage/interfaces/quit
108
sage/interfaces/read_data
109
110
.. include:: ../footer.txt
111
112