Ask Your Question

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

asked 2016-11-08 19:38:49 +0100

edenharder gravatar image

updated 2016-11-09 09:43:15 +0100

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 20:08:41 +0100 )edit

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

slelievre gravatar imageslelievre ( 2016-11-09 09:44:47 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-08 20:14:50 +0100

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 20:52:29 +0100 )edit

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

paulmasson gravatar imagepaulmasson ( 2016-11-08 23:52:32 +0100 )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 19:38:49 +0100

Seen: 3,765 times

Last updated: Nov 09 '16