On Thursday 09 October 2008, john_perry_usm wrote: > Hi, > > I have a small library of SAGE functions. I've saved it as > somefile.py. I can import it and run it in SAGE using > > >>> import somefile.py > >>> somefile.read_blah() > > However, this works only as long as somefile.py uses only Python > commands & structures. If I try to define a PolynomialRing, it > complains that the global name 'PolynomialRing' is not defined. > > How do I get around this? I tried renaming it as somefile.sage but > that won't import at all.
try to add from sage.all import * at the top of the file. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---