diff --git a/src/sage/interfaces/all.py b/src/sage/interfaces/all.py index 341564e4dce..c05be0084b8 100644 --- a/src/sage/interfaces/all.py +++ b/src/sage/interfaces/all.py @@ -1,50 +1,48 @@ # interfaces to other interpreters -from sage.misc.lazy_import import lazy_import - -from .frobby import frobby -from .four_ti_2 import four_ti_2 -from .axiom import Axiom, axiom -from .fricas import FriCAS, fricas - +from .sage0 import sage0, sage0_version, Sage from .gap import gap, gap_reset_workspace, Gap -from .gap3 import gap3, gap3_version, Gap3 -lazy_import('sage.interfaces.genus2reduction', ['genus2reduction', 'Genus2reduction']) -from .gfan import gfan, Gfan -from .giac import giac, Giac from .gp import gp, gp_version, Gp -from .gnuplot import gnuplot -from .kash import kash, kash_version, Kash -from .lisp import lisp, Lisp +# import problems +#from maxima_lib import maxima_lib +from .maxima import maxima, Maxima +from .singular import singular, singular_version, Singular + from .magma import magma, Magma -from .magma_free import magma_free -from .macaulay2 import macaulay2, Macaulay2 -from .maple import maple, Maple -lazy_import('sage.interfaces.maxima', ['maxima', 'Maxima']) -from .mathematica import mathematica, Mathematica -from .mathics import mathics, Mathics -from .matlab import matlab, matlab_version, Matlab -from .mupad import mupad, Mupad # NOT functional yet -from .mwrank import mwrank, Mwrank -from .octave import octave, Octave from .polymake import polymake -from .qepcad import qepcad, qepcad_version, qepcad_formula -from .qsieve import qsieve -from .singular import singular, singular_version, Singular -from .sage0 import sage0 as sage0, sage0_version, Sage -from .scilab import scilab -from .tachyon import tachyon_rt -from .psage import PSage -from .ecm import ECM, ecm -from .povray import povray -from .lie import lie, LiE -from .r import r, R, r_version -from .read_data import read_data -interfaces = ['gap', 'gap3', 'giac', 'gp', 'mathematica', 'gnuplot', \ - 'kash', 'magma', 'macaulay2', 'maple', 'maxima', \ - 'mathematica', 'mwrank', 'octave', 'r', \ - 'singular', 'sage0', 'sage'] +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.interfaces.axiom', ['Axiom', 'axiom']) +lazy_import('sage.interfaces.ecm', ['ECM', 'ecm']) +lazy_import('sage.interfaces.four_ti_2', 'four_ti_2') +lazy_import('sage.interfaces.fricas', ['FriCAS', 'fricas']) +lazy_import('sage.interfaces.frobby', 'frobby') +lazy_import('sage.interfaces.gap3', ['gap3', 'gap3_version', 'Gap3']) +lazy_import('sage.interfaces.genus2reduction', ['genus2reduction', 'Genus2reduction']) +lazy_import('sage.interfaces.gfan', ['gfan', 'Gfan']) +lazy_import('sage.interfaces.giac', ['giac', 'Giac']) +lazy_import('sage.interfaces.gnuplot', 'gnuplot') +lazy_import('sage.interfaces.kash', ['kash', 'kash_version', 'Kash']) +lazy_import('sage.interfaces.lie', ['lie', 'LiE']) +lazy_import('sage.interfaces.lisp', ['lisp', 'Lisp']) +lazy_import('sage.interfaces.macaulay2', ['macaulay2', 'Macaulay2']) +lazy_import('sage.interfaces.magma_free', 'magma_free') +lazy_import('sage.interfaces.maple', ['maple', 'Maple']) +lazy_import('sage.interfaces.mathematica', ['mathematica', 'Mathematica']) +lazy_import('sage.interfaces.mathics', ['mathics', 'Mathics']) +lazy_import('sage.interfaces.matlab', ['matlab', 'matlab_version', 'Matlab']) +lazy_import('sage.interfaces.mupad', ['mupad', 'Mupad']) # NOT functional yet +lazy_import('sage.interfaces.mwrank', ['mwrank', 'Mwrank']) +lazy_import('sage.interfaces.octave', ['octave', 'Octave']) +lazy_import('sage.interfaces.povray', 'povray') +lazy_import('sage.interfaces.psage', 'PSage') +lazy_import('sage.interfaces.qepcad', ['qepcad', 'qepcad_version', 'qepcad_formula']) +lazy_import('sage.interfaces.qsieve', 'qsieve') +lazy_import('sage.interfaces.r', ['r', 'R', 'r_version']) +lazy_import('sage.interfaces.read_data', 'read_data') +lazy_import('sage.interfaces.scilab', 'scilab') +lazy_import('sage.interfaces.tachyon', 'tachyon_rt') try: from sage.repl.rich_output.display_manager import get_display_manager as _get_display_manager diff --git a/src/sage/interfaces/axiom.py b/src/sage/interfaces/axiom.py index 0bc5334b071..4de851d50b4 100644 --- a/src/sage/interfaces/axiom.py +++ b/src/sage/interfaces/axiom.py @@ -490,7 +490,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: axiom.__reduce__() + sage: Axiom().__reduce__() (, ()) sage: f, args = _ sage: f(*args) diff --git a/src/sage/interfaces/giac.py b/src/sage/interfaces/giac.py index 98381afeea3..d7a259fd3d5 100644 --- a/src/sage/interfaces/giac.py +++ b/src/sage/interfaces/giac.py @@ -371,7 +371,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: giac.__reduce__() + sage: Giac().__reduce__() (, ()) sage: f, args = _ sage: f(*args) diff --git a/src/sage/interfaces/kash.py b/src/sage/interfaces/kash.py index bc389c74a07..6e40544e70c 100644 --- a/src/sage/interfaces/kash.py +++ b/src/sage/interfaces/kash.py @@ -672,7 +672,7 @@ def _function_call_string(self, function, args, kwds): EXAMPLES:: - sage: kash._function_call_string('Expand', ['x', 'y'], ['Prec:=10']) + sage: Kash()._function_call_string('Expand', ['x', 'y'], ['Prec:=10']) 'Expand(x,y,rec(Prec:=10))' """ if not kwds: diff --git a/src/sage/interfaces/lie.py b/src/sage/interfaces/lie.py index 3d3a0ded886..13f2bd33814 100644 --- a/src/sage/interfaces/lie.py +++ b/src/sage/interfaces/lie.py @@ -474,7 +474,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: lie.__reduce__() + sage: LiE().__reduce__() (, ()) """ return reduce_load_lie, tuple([]) diff --git a/src/sage/interfaces/lisp.py b/src/sage/interfaces/lisp.py index 7b057a4de3c..33ea51d12f7 100644 --- a/src/sage/interfaces/lisp.py +++ b/src/sage/interfaces/lisp.py @@ -220,7 +220,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: lisp.__reduce__() + sage: Lisp().__reduce__() (, ()) """ return reduce_load_Lisp, tuple([]) diff --git a/src/sage/interfaces/macaulay2.py b/src/sage/interfaces/macaulay2.py index b5bcac4003f..0d90f366001 100644 --- a/src/sage/interfaces/macaulay2.py +++ b/src/sage/interfaces/macaulay2.py @@ -237,7 +237,7 @@ def __reduce__(self): EXAMPLES:: - sage: rlm2, t = macaulay2.__reduce__() + sage: rlm2, t = Macaulay2().__reduce__() sage: rlm2(*t) Macaulay2 """ diff --git a/src/sage/interfaces/magma.py b/src/sage/interfaces/magma.py index 89dc1aa8140..8d8a97b88b5 100644 --- a/src/sage/interfaces/magma.py +++ b/src/sage/interfaces/magma.py @@ -566,6 +566,7 @@ def _preparse(self, s): EXAMPLES:: + sage: magma = Magma() sage: magma._preparse_colon_equals = False sage: magma._preparse('a = 5') 'a = 5' diff --git a/src/sage/interfaces/maple.py b/src/sage/interfaces/maple.py index 50a2d803d25..e9f0d5d6fb0 100644 --- a/src/sage/interfaces/maple.py +++ b/src/sage/interfaces/maple.py @@ -337,7 +337,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: maple.__reduce__() + sage: Maple().__reduce__() (, ()) sage: f, args = _ sage: f(*args) diff --git a/src/sage/interfaces/mupad.py b/src/sage/interfaces/mupad.py index e4e8531e6c2..00034b4af16 100644 --- a/src/sage/interfaces/mupad.py +++ b/src/sage/interfaces/mupad.py @@ -147,7 +147,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: mupad.__reduce__() + sage: Mupad().__reduce__() (, ()) """ diff --git a/src/sage/interfaces/mwrank.py b/src/sage/interfaces/mwrank.py index 701b91b5afe..ae65d0ffea0 100644 --- a/src/sage/interfaces/mwrank.py +++ b/src/sage/interfaces/mwrank.py @@ -210,7 +210,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: mwrank.__reduce__() + sage: Mwrank().__reduce__() (, ()) """ diff --git a/src/sage/interfaces/octave.py b/src/sage/interfaces/octave.py index 1f3c2cbd3b2..81d48cf3c10 100644 --- a/src/sage/interfaces/octave.py +++ b/src/sage/interfaces/octave.py @@ -231,7 +231,7 @@ def __reduce__(self): """ EXAMPLES:: - sage: octave.__reduce__() + sage: Octave().__reduce__() (, ()) """ return reduce_load_Octave, tuple([]) diff --git a/src/sage/rings/finite_rings/integer_mod.pyx b/src/sage/rings/finite_rings/integer_mod.pyx index 58218d9a193..cd18fd4ed01 100644 --- a/src/sage/rings/finite_rings/integer_mod.pyx +++ b/src/sage/rings/finite_rings/integer_mod.pyx @@ -91,8 +91,6 @@ from sage.libs.pari.all import pari, PariError import sage.rings.integer_ring as integer_ring import sage.rings.rational_field -import sage.interfaces.all - import sage.rings.integer cimport sage.rings.integer from sage.rings.integer cimport Integer diff --git a/src/sage/rings/finite_rings/integer_mod_ring.py b/src/sage/rings/finite_rings/integer_mod_ring.py index 12c3c71c5ba..90ed5965c27 100644 --- a/src/sage/rings/finite_rings/integer_mod_ring.py +++ b/src/sage/rings/finite_rings/integer_mod_ring.py @@ -72,7 +72,6 @@ from sage.libs.pari.all import pari, PariError -import sage.interfaces.all from sage.misc.cachefunc import cached_method from sage.structure.factory import UniqueFactory