Detecting external software¶
This module makes up a list of external software that Sage interfaces. Availability of each software is tested only when necessary. This is mainly used for the doctests which require certain external software installed on the system.
AUTHORS:
- Kwankyu Lee (2016-03-09) – initial version, based on code by Robert Bradshaw and Nathann Cohen
-
class
sage.doctest.external.
AvailableSoftware
¶ Bases:
object
This class keeps the set of available software whose availability is detected lazily from the list of external software.
EXAMPLES:
sage: from sage.doctest.external import external_software, available_software sage: external_software ['cplex', 'gurobi', 'internet', 'latex', 'macaulay2', 'magma', 'maple', 'mathematica', 'matlab', 'octave', 'scilab'] sage: 'internet' in available_software # random True sage: available_software.issuperset(set(['internet','latex'])) # random True
-
issuperset
(other)¶ Return
True
ifother
is a subset ofself
.EXAMPLES:
sage: from sage.doctest.external import available_software sage: available_software.issuperset(set(['internet','latex','magma'])) # random True
-
seen
()¶ Return the list of detected external software.
EXAMPLES:
sage: from sage.doctest.external import available_software sage: available_software.seen() # random ['internet', 'latex', 'magma']
-
-
sage.doctest.external.
has_cplex
()¶ Test if CPLEX is available.
EXAMPLES:
sage: from sage.doctest.external import has_cplex sage: has_cplex() # random True
-
sage.doctest.external.
has_gurobi
()¶ Test if Gurobi is available.
EXAMPLES:
sage: from sage.doctest.external import has_gurobi sage: has_gurobi() # random True
-
sage.doctest.external.
has_internet
()¶ Test if Internet is available.
Failure of connecting to the site “http://www.sagemath.org” within a second is regarded as internet being not available.
EXAMPLES:
sage: from sage.doctest.external import has_internet sage: has_internet() # random True
-
sage.doctest.external.
has_latex
()¶ Test if Latex is available.
EXAMPLES:
sage: from sage.doctest.external import has_latex sage: has_latex() # random True
-
sage.doctest.external.
has_macaulay2
()¶ Test if Macaulay2 is available.
EXAMPLES:
sage: from sage.doctest.external import has_macaulay2 sage: has_macaulay2() # random True
-
sage.doctest.external.
has_magma
()¶ Test if Magma is available.
EXAMPLES:
sage: from sage.doctest.external import has_magma sage: has_magma() # random True
-
sage.doctest.external.
has_maple
()¶ Test if Maple is available.
EXAMPLES:
sage: from sage.doctest.external import has_maple sage: has_maple() # random True
-
sage.doctest.external.
has_mathematica
()¶ Test if Mathematica is available.
EXAMPLES:
sage: from sage.doctest.external import has_mathematica sage: has_mathematica() # random True
-
sage.doctest.external.
has_matlab
()¶ Test if Matlab is available.
EXAMPLES:
sage: from sage.doctest.external import has_matlab sage: has_matlab() # random True
-
sage.doctest.external.
has_octave
()¶ Test if Octave is available.
EXAMPLES:
sage: from sage.doctest.external import has_octave sage: has_octave() # random True
-
sage.doctest.external.
has_scilab
()¶ Test if Scilab is available.
EXAMPLES:
sage: from sage.doctest.external import has_scilab sage: has_scilab() # random True