# Revision history [back]

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

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