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

Commit

Permalink
trac 34547: unconditionally lazily import *_console and move the
Browse files Browse the repository at this point in the history
imports to all_cmdline.py
  • Loading branch information
jhpalmieri committed Dec 20, 2022
1 parent 4f0dc51 commit 70b7c44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
10 changes: 10 additions & 0 deletions src/sage/all_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@
from sage.calculus.predefined import x

sage.misc.session.init()

from sage.misc.lazy_import import lazy_import

for pkg in ['axiom', 'fricas', 'gap' , 'gap3', 'giac', 'gp',
'gnuplot', 'kash', 'magma', 'macaulay2', 'maple',
'mathematica', 'mathics', 'matlab',
'mupad', 'mwrank', 'octave', 'qepcad', 'singular',
'sage0', 'lie', 'r']:
lazy_import(f'sage.interfaces.{pkg}', f'{pkg}_console')
lazy_import('sage.interfaces.maxima_abstract', 'maxima_console')
13 changes: 0 additions & 13 deletions src/sage/interfaces/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,3 @@
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
except ImportError:
pass
else:
if _get_display_manager().is_in_terminal():
for pkg in ['axiom', 'fricas', 'gap' , 'gap3', 'giac', 'gp',
'gnuplot', 'kash', 'magma', 'macaulay2', 'maple',
'mathematica', 'mathics', 'matlab', 'maxima' ,
'mupad', 'mwrank', 'octave', 'qepcad', 'singular',
'sage0', 'lie', 'r']:
lazy_import(f'sage.interfaces.{pkg}', f'{pkg}_console')

0 comments on commit 70b7c44

Please sign in to comment.