Ask Your Question

Running sage / cocalc

asked 2018-05-07 10:07:37 -0500

standardtrickyness gravatar image

I don't know if this is the place but I'm confused as to how to run a sage program. I'm told that there's not really a sage editor or whatnot does cocalc allow you to write an entire program and then run it or does it autorun any command entered into it?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-05-07 12:18:33 -0500

slelievre gravatar image

From the "Files" view in a CoCalc project, the "Filename" box lets you create files by either

  • typing a file name in the "Filename" box and hitting ENTER,
  • clicking the "+ New" button and selecting a file type.

Among other file types, you can create

  • a CoCalc worksheet (if you input a name ending in .sagews)
  • a Jupyter notebook (file ending in .ipynb)
  • a code file (file ending in .py, or .sage, or many other extensions)

You can also open a terminal (type a name ending in .term and hit enter).

If you don't specify a file type, you get a CoCalc worksheet.

You can of course type the content of your Sage program in a .sage file, say experiment.sage, then run that program by opening a CoCalc terminal, typing

sage experiment.sage

and hitting enter.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2018-05-07 10:07:37 -0500

Seen: 55 times

Last updated: May 07