Ask Your Question
1

Can I run SAGE in an editor

asked 2013-02-05 10:47:01 +0200

mcmeekin gravatar image

I was wondering if there is a way to use SAGE in an editor like Komodo. I only know how to run it using the terminal, but then if I want to write a lengthy program in SAGE I have to retype it line by line whenever I make a typo.

Also, can I store definitions I write using the SAGE library to be used later (like in python I could make a module)?

I'm using Python 2.7.2, OSX 10.6.8, Sage version 4.1.1 and I have Komodo Edit version 7.1.3.

edit retag flag offensive close merge delete

Comments

You can also use a program called cantor.

eric.c.kangas gravatar imageeric.c.kangas ( 2013-02-06 10:23:59 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-02-05 11:07:47 +0200

kcrisman gravatar image

You can use it from Emacs, anyway. See sage-mode.

You can definitely make a new module for your own purposes; Sage is basically Python under the hood.

Also, you could in theory do the following (I do this very naive workflow sometimes).

  1. Open a Sage file in an editor, called foo.sage.
  2. Open a Sage session, and use attach /path/to/foo.sage to load it up.
  3. Make changes in foo.sage and save them, in your (still-open) editor.
  4. Since you used attach and not load, the changes should now show up (maybe after hitting return?).

Probably you are looking for something more sophisticated, but this does work.

edit flag offensive delete link more

Comments

Okay great! I will try these things out and I'll post again if I have more questions. Thanks!

mcmeekin gravatar imagemcmeekin ( 2013-02-07 11:09:56 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-02-05 10:47:01 +0200

Seen: 1,042 times

Last updated: Feb 05 '13