Ticket #7377: trac_7377-lazy-maxlib.p2.patch

File trac_7377-lazy-maxlib.p2.patch, 881 bytes (added by nbruin, 9 years ago)

Lazy import of maxima in calculus using sage.misc.lazy_import

  • sage/calculus/calculus.py

    # HG changeset patch
    # User Nils Bruin <nbruin@sfu.ca>
    # Date 1299001283 28800
    # Node ID 3f933d7710d60ce9576589d28a9772c65fbbb596
    # Parent  ab67d83570dd001f2290e75730689b658ec4a75d
    Lazy import of maxima in calculus using sage.misc.lazy_import
    
    diff -r ab67d83570dd -r 3f933d7710d6 sage/calculus/calculus.py
    a b  
    383383    sage: sage.calculus.calculus.maxima('f1')
    384384    f1
    385385"""
    386 import sage.interfaces.maxima_lib
    387 maxima = sage.interfaces.maxima_lib.maxima_lib
     386from sage.misc.lazy_import import lazy_import
     387lazy_import('sage.interfaces.maxima_lib','maxima')
    388388# This is not the same instance of Maxima as the general purpose one
    389389#from sage.interfaces.maxima import Maxima
    390390#maxima = Maxima(init_code = ['display2d : false', 'domain : complex',