On Wed, Oct 16, 2019 at 6:18 PM pong <[email protected]> wrote:
>
> I have a bunch of old scripts in .sage files. They were compiled into .pyc
> files years ago.
*.sage files are preparsed by sage preparser, and converted into *.py files.
Conversion into *.pyc files is done automatically, as *.py files are
loaded into Sage's Python interpreter.
One cannot load() or attach() *.pyc files, as far as I know - but why
would you need this?
(unless you want to hide the source of your *.sage scripts from the user)
HTH
Dima
>
> Unfortunately, I only remember that I ran sage --preparse on the .sage files
> and got them into .py files but forgot what next.
>
> I tried import py_compile in sage then ran py_compile.compile('xxx.py') which
> gave me a .pyc file but I couldn't load it or attach it to sage.
>
> I understand one can change the file extension to .spyx and have sage to
> compile it by loading it into a session but I would like the pyc files by
> themselves.
>
> Can I get some help on this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/f28af744-043a-4100-b965-ce5642887512%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/CAAWYfq2-Bjw4%2BYR5x9y%2Bh6XzLXP8brWRFgERcmdExzni0zAaZg%40mail.gmail.com.