Ejemplo n.º 1
0
from sage.matroids.all import *

# Lazily import notebook functions and interacts (#15335)
lazy_import('sagenb.notebook.notebook_object', 'notebook')
lazy_import('sagenb.notebook.notebook_object', 'inotebook')
lazy_import('sagenb.notebook.sage_email', 'email')
lazy_import('sagenb.notebook.interact', 'interact')
lazy_import('sage.interacts', 'all', 'interacts')
from sage.interacts.debugger import debug

from copy import copy, deepcopy

# The code executed here uses a large amount of Sage components
from sage.rings.qqbar import _init_qqbar
_init_qqbar()

#Deprecate the is_* functions from the top level
#All of these functions should be removed from the top level
#after a few releases, and this code should be removed.
#--Mike Hansen 9/25/2008
message = "\nUsing %(name)s from the top level is deprecated since it was designed to be used by developers rather than end users.\nIt most likely does not do what you would expect it to do.  If you really need to use it, import it from the module that it is defined in."
sage.misc.superseded.deprecated_callable_import(
    10107, None, globals(), locals(), [
        name for name in globals().keys()
        if name.startswith('is_') and name[3].isupper()
    ], message)

del message, name

###########################################################
Ejemplo n.º 2
0
from sage.matroids.all   import *

# Lazily import notebook functions and interacts (#15335)
lazy_import('sagenb.notebook.notebook_object', 'notebook')
lazy_import('sagenb.notebook.notebook_object', 'inotebook')
lazy_import('sagenb.notebook.sage_email', 'email')
lazy_import('sagenb.notebook.interact', 'interact')
lazy_import('sage.interacts', 'all', 'interacts')
from sage.interacts.debugger import debug

from copy import copy, deepcopy

# The code executed here uses a large amount of Sage components
from sage.rings.qqbar import _init_qqbar
_init_qqbar()

###########################################################
#### WARNING:
# DO *not* import numpy / matplotlib / networkx here!!
# Each takes a surprisingly long time to initialize,
# and that initialization should be done more on-the-fly
# when they are first needed.
###########################################################

###################################################################

# maximize memory resources
#try:
#    import resource   # unix only...
#    resource.setrlimit(resource.RLIMIT_AS, (-1,-1))