#20382: Replace is_package_installed with Features
-------------------------------------+-------------------------------------
Reporter: saraedum | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-7.2
Component: build | Resolution:
Keywords: | Merged in:
Authors: Julian Rüth | Reviewers: Nicolas M. Thiéry,
| ...
Report Upstream: N/A | Work issues: reorder classes in
| sage.misc.feature
Branch: | Commit:
u/saraedum/replace_is_package_installed_with_features|
b6c4797ace44ecb6b85ec1d17e53258970866e7d
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Checking availability of a Python module as you did has consequences
{{{
sage: def is_present(module):
....: import importlib
....: try:
....: importlib.import_module(module)
....: return True
....: except ImportError:
....: return False
sage: print len(sys.modules), 'numpy' in sys.modules
2625 False
sage: is_present('numpy')
True
sage: print len(sys.modules), 'numpy' in sys.modules
2710 True
}}}
This would better be documented.
--
Ticket URL: <https://trac.sagemath.org/ticket/20382#comment:40>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.