On Tue, Jul 20, 2010 at 8:58 AM, KvS <keesvansch...@gmail.com> wrote: > So I guess my problem is that I don't understand the namespaces > involved somehow, since sgn() lives somewhere in a Sage namespace and > importing doesn't place the code in the right name space or something? > Does anybody have a hint how I may do things so such an import will > work?
The globals defined when Sage starts up are from sage.all (or sage.all_cmdline or sage.all_notebook). So, in your module, you could do "from sage.all import sgn" along with anything else you need. You could also do "from sage.all import *". --Mike -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org