Ask Your Question
3

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

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

edenharder gravatar image

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

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

Comments

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](http://example.com/link).

paulmasson gravatar imagepaulmasson ( 2016-11-08 20:08:41 +0200 )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 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

https://github.com/sagemath/sage/blob...

edit flag offensive delete link more

Comments

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 +0200 )edit

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

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

Stats

Asked: 2016-11-08 19:38:49 +0200

Seen: 2,310 times

Last updated: Nov 09 '16