Ask Your Question

What does `from sage.all import *` do?

asked 2016-11-08 12:38:49 -0600

edenharder gravatar image

updated 2016-11-09 02:43:15 -0600

slelievre gravatar image

This question is relatd with another one: What packages in sage can I use in python?

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_igraphinstalled.

ps: My karma is insufficient to publish links.

edit retag flag offensive close merge delete


FYI 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](

paulmasson gravatar imagepaulmasson ( 2016-11-08 13:08:41 -0600 )edit

@paulmasson, at the time of posting, the original poster had karma too low to post links.

slelievre gravatar imageslelievre ( 2016-11-09 02:44:47 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-11-08 13:14:50 -0600

You can see exactly what is imported with that command from the source code here:

edit flag offensive delete link more


True, but there are LOTS of imports those depend upon and there are some other Python packages those load, etc...

kcrisman gravatar imagekcrisman ( 2016-11-08 13:52:29 -0600 )edit

Yeah, but that's where the process starts. Then just follow the imports...

paulmasson gravatar imagepaulmasson ( 2016-11-08 16:52:32 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-11-08 12:38:49 -0600

Seen: 1,945 times

Last updated: Nov 09 '16