Ask Your Question
3

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

asked 8 years ago

edenharder gravatar image

updated 8 years ago

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.

Preview: (hide)

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 ( 8 years ago )

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

slelievre gravatar imageslelievre ( 8 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

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

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

Preview: (hide)
link

Comments

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

kcrisman gravatar imagekcrisman ( 8 years ago )

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

paulmasson gravatar imagepaulmasson ( 8 years ago )

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: 8 years ago

Seen: 4,714 times

Last updated: Nov 09 '16