\frametitle {SAGE Demo: Interfaces} {\dred HOW THEY WORK:} Use buffered psuedo-tty, files, and Python objects that wrap native objects. This makes it possible to wrap {\dred all} math software that has a command line interface using similar code. \vfill {\blue \begin{verbatim} sage: x = gp('9+6') # the GP/PARI math software \end{verbatim}} This fires up one copy of GP/PARI (if it wasn't already started) and sends the line {\tt 'sage[1] = 9+6'} to it. It also creates a Python class x with a field set to {\tt "sage[1]"}. {\small\blue \begin{verbatim} sage: !ps ax |grep gp 16389 p5 Ss+ 0:00.02 /Users/was/s/local/bin/gp --fast ... sage: type(x) sage: x 15 sage: x.name() 'sage[1]' sage: x.factor() [3, 1; 5, 1] \end{verbatim} }