Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
use the MAXIMA variable in maxima_abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwifb committed Sep 15, 2020
1 parent 5ec24db commit 3801013
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/interfaces/maxima_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import sys
import subprocess

from sage.env import DOT_SAGE
from sage.env import DOT_SAGE, MAXIMA
COMMANDS_CACHE = '%s/maxima_commandlist_cache.sobj' % DOT_SAGE

from sage.cpython.string import bytes_to_str
Expand Down Expand Up @@ -167,7 +167,7 @@ def _command_runner(self, command, s, redirect=True):
-- Function: gcd (<p_1>, <p_2>, <x_1>, ...)
...
"""
cmd = 'maxima --very-quiet --batch-string="%s(%s);" '%(command, s)
cmd = '{} --very-quiet --batch-string="{}({});" '.format(MAXIMA, command, s)
if sage.server.support.EMBEDDED_MODE:
cmd += '< /dev/null'

Expand Down Expand Up @@ -2218,7 +2218,7 @@ def maxima_version():
sage: maxima_version() # random
'5.41.0'
"""
with os.popen('maxima --version') as p:
with os.popen('{} --version'.format(MAXIMA)) as p:
return p.read().split()[-1]


Expand All @@ -2236,4 +2236,4 @@ def maxima_console():
from sage.repl.rich_output.display_manager import get_display_manager
if not get_display_manager().is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%maxima magics instead.')
os.system('maxima')
os.system('{}'.format(MAXIMA))

0 comments on commit 3801013

Please sign in to comment.