Hi Victor, On 5 Aug., 23:37, VictorMiller <victorsmil...@gmail.com> wrote: > I find that in writing python code for inclusion into SAGE that I > always need to add lines like: > > from foo import baz,faz,buz > > to the top of my file, in order to get standard SAGE things such as > ZZ, QQ, factor, randint, etc. etc. known to the code. The way I've > been doing that is to look at my code, and find one the names, such as > ZZ and then do > > sage: ZZ? > > and read off the location of this from the top of docstring, and > translate it (by hand) to a from line.
I think it is easier to do from sage.all import ZZ instead of providing its exact location (from sage.rings.integer...). Moreover, using sage.all is more stable, because the exact location of things can change (so that "from sage.rings...." would break), but "from sage.all" will still work. I don't know if "from sage.all import *" works, but I guess it is not recommended to load such a huge amount of things if you just need few of them. Cheers, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org