ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 09 Nov 2016 09:44:47 +0100What does `from sage.all import *` do?https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/This question is relatd with another one: [What packages in sage can I use in python?](http://ask.sagemath.org/question/35464/what-packages-in-sage-can-i-use-in-python/)
[How do I import Sage into a Python script](http://doc.sagemath.org/html/en/faq/faq-usage.html#how-do-i-import-sage-into-a-python-script) told me that to use from `sage.all import *` to import sage packages in python. When I list the installed sage packages, there is igraph and python-igraph. But `from sage.all import *` will not import them into python. I'd like to know, what kind of packages can be imported when I use `from sage.all import *`.
BTW, the proper way to use `igraph` in python is `import igraph` with `python_igraph`installed.
ps: My karma is insufficient to publish links.Tue, 08 Nov 2016 19:38:49 +0100https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/Comment by paulmasson for <p>This question is relatd with another one: <a href="http://ask.sagemath.org/question/35464/what-packages-in-sage-can-i-use-in-python/">What packages in sage can I use in python?</a></p>
<p><a href="http://doc.sagemath.org/html/en/faq/faq-usage.html#how-do-i-import-sage-into-a-python-script">How do I import Sage into a Python script</a> told me that to use from <code>sage.all import *</code> to import sage packages in python. When I list the installed sage packages, there is igraph and python-igraph. But <code>from sage.all import *</code> will not import them into python. I'd like to know, what kind of packages can be imported when I use <code>from sage.all import *</code>.</p>
<p>BTW, the proper way to use <code>igraph</code> in python is <code>import igraph</code> with <code>python_igraph</code>installed.</p>
<p>ps: My karma is insufficient to publish links.</p>
https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35485#post-id-35485FYI links need to have an explicit `http://` in front of them to auto convert. Or you can format them explicitly with the markdown `[link descrption](http://example.com/link)`.Tue, 08 Nov 2016 20:08:41 +0100https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35485#post-id-35485Comment by slelievre for <p>This question is relatd with another one: <a href="http://ask.sagemath.org/question/35464/what-packages-in-sage-can-i-use-in-python/">What packages in sage can I use in python?</a></p>
<p><a href="http://doc.sagemath.org/html/en/faq/faq-usage.html#how-do-i-import-sage-into-a-python-script">How do I import Sage into a Python script</a> told me that to use from <code>sage.all import *</code> to import sage packages in python. When I list the installed sage packages, there is igraph and python-igraph. But <code>from sage.all import *</code> will not import them into python. I'd like to know, what kind of packages can be imported when I use <code>from sage.all import *</code>.</p>
<p>BTW, the proper way to use <code>igraph</code> in python is <code>import igraph</code> with <code>python_igraph</code>installed.</p>
<p>ps: My karma is insufficient to publish links.</p>
https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35492#post-id-35492@paulmasson, at the time of posting, the original poster had karma too low to post links.Wed, 09 Nov 2016 09:44:47 +0100https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35492#post-id-35492Answer by paulmasson for <p>This question is relatd with another one: <a href="http://ask.sagemath.org/question/35464/what-packages-in-sage-can-i-use-in-python/">What packages in sage can I use in python?</a></p>
<p><a href="http://doc.sagemath.org/html/en/faq/faq-usage.html#how-do-i-import-sage-into-a-python-script">How do I import Sage into a Python script</a> told me that to use from <code>sage.all import *</code> to import sage packages in python. When I list the installed sage packages, there is igraph and python-igraph. But <code>from sage.all import *</code> will not import them into python. I'd like to know, what kind of packages can be imported when I use <code>from sage.all import *</code>.</p>
<p>BTW, the proper way to use <code>igraph</code> in python is <code>import igraph</code> with <code>python_igraph</code>installed.</p>
<p>ps: My karma is insufficient to publish links.</p>
https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?answer=35488#post-id-35488You can see exactly what is imported with that command from the source code here:
https://github.com/sagemath/sage/blob/master/src/sage/all.py
Tue, 08 Nov 2016 20:14:50 +0100https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?answer=35488#post-id-35488Comment by kcrisman for <p>You can see exactly what is imported with that command from the source code here:</p>
<p><a href="https://github.com/sagemath/sage/blob/master/src/sage/all.py">https://github.com/sagemath/sage/blob...</a></p>
https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35489#post-id-35489True, but there are LOTS of imports those depend upon and there are some other Python packages those load, etc...Tue, 08 Nov 2016 20:52:29 +0100https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35489#post-id-35489Comment by paulmasson for <p>You can see exactly what is imported with that command from the source code here:</p>
<p><a href="https://github.com/sagemath/sage/blob/master/src/sage/all.py">https://github.com/sagemath/sage/blob...</a></p>
https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35491#post-id-35491Yeah, but that's where the process starts. Then just follow the imports...Tue, 08 Nov 2016 23:52:32 +0100https://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/?comment=35491#post-id-35491