On Mon, Jun 28, 2010 at 11:07 AM, Mariah Lenox <[email protected]> wrote: > Consider the following files and what sage > does with each when they are loaded: > > ---- foo1.sage ------ > def add(a,b): > return a+b > ------------------------ > > --- foo2.py--- > def add(a,b): > return a+b > # this is a comment > --------------------- > > --- foo3.sage--- > def add(a,b): > return a+b > # this is a comment > --------------------- > > eno% ./sage > ---------------------------------------------------------------------- > | Sage Version 4.4.4, Release Date: 2010-06-23 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > sage: load "foo1.sage" > sage: load "foo2.py" > sage: load "foo3.sage" > ------------------------------------------------------------ > File "<string>", line 3 > # this is a comment > ^ > SyntaxError: invalid syntax > > sage: > > Is the inability to load foo3.sage a bug or a feature?
It's a bug. Please make a trac ticket for this. Note that adding a newline to the end of the file is enough to fix the problem... > > Mariah > > -- > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
