Running a .sage file on Windows

384 views
Skip to first unread message

J.D. Quigley

unread,
Apr 28, 2014, 9:21:25 AM4/28/14
to sage-s...@googlegroups.com


Hello,

This is probably a very basic question, but any guidance would be appreciated. Is there a way to run a .sage file on Windows? I'm able to run .sws files by running Sage on VirtualBox and then importing the file through localhost:8000 (or by importing to sagenb.com), but I'm not able to run .sage files. I've tried running them on sagenb.com, localhost:8000, and by opening them from a shared drive in my virtual machine. 

Thanks!
J.D.

kcrisman

unread,
Apr 28, 2014, 11:09:16 AM4/28/14
to sage-s...@googlegroups.com


On Monday, April 28, 2014 9:21:25 AM UTC-4, J.D. Quigley wrote:


Hello,

This is probably a very basic question, but any guidance would be appreciated. Is there a way to run a .sage file on Windows? I'm able to run .sws files by running Sage on VirtualBox and then importing the file through localhost:8000 (or by importing to sagenb.com), but I'm not able to run .sage files. I've tried running them on sagenb.com, localhost:8000, and by opening them from a shared drive in my virtual machine. 

Hi!

.sage files are essentially scripts in the Sage variant of Python.  There are a few things you can do to run it.

1) Use the command-line interface on your VirtualBox installation and run them there (this should work the same way you import other ones).

2) Use the "Data" drop-down menu in the Sage notebook to upload the file, and do attach DATA+"my_file.sage" as the first cell you evaluate.  (Untested, you may have to not use quotes or something.)

3) Copy and paste the entire .sage file into a first cell of the worksheet and then do %hide at the top to 'hide' it...

I hope one of these helps.
- kcrisman

J.D. Quigley

unread,
May 10, 2014, 5:54:01 PM5/10/14
to sage-s...@googlegroups.com
kcrisman,

Thank you so much for the quick response - I somehow managed to completely forget about my question until today. I ended up trying (2) first, and it worked with the quotes. Thanks again!
Reply all
Reply to author
Forward
0 new messages