1 | initial version |

You could instead apply the sage preparser, resulting in a `.py`

file which you can then import with no trouble. Preparsing seems to be handled by `sage-preparse`

, although I haven't had luck using it directly. Fortunately, it's easy to use indirectly: if you call "`sage filename.sage`

", sage will preparse and store `filename.py`

in the same directory (as well as carrying out all the commands in the file, which will be problematic in some cases, I know).

hope this helps,

Niles

2 | sage --preparse |

You could instead apply the sage ~~preparser, ~~preparser, resulting in a `.py`

file which you can then import with no trouble. ~~ Preparsing seems to be handled by ~~`sage-preparse`

, although I haven't had luck using it directly. Fortunately, it's easy to use indirectly: if

If you call "`sage filename.sage`

", sage will preparse and store `filename.py`

in the same directory (as well as carrying out all the commands in the file, which will be problematic in some ~~cases, I know).~~cases). @ivan-andrus points out that

~~hope this helps,~~"`sage --preparse filename.sage`

"

will do just the preparsing :)

Niles

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.