Is the Sage command line limiting?
The central issue I want to address in this post is: Does the Sage command line interface, which is text-based, limit what you could do with Sage?
My short answer is, “No”. With careful use and experience, the Sage command line interface can be a powerful tool. Say you want to step through a function to understand how it works. As of Sage 4.6, the Sage command line is the only place where you can interactively step through a calculation, via the function trace(). As another example, say you have a Sage script called
and you want to edit it and load it immediately after each edit. From the command line, do
sage: %edit /home/username/myscript.sage
to load your Sage script, and edit it. After you are done, quit your editor and you should be back at the Sage command line, with your updated script automatically loaded.
Or say you want to interact with your operating system without having to quit Sage. From the Sage command line, do
and you should be presented with a shell for interacting with your system. When you are done, enter “exit” and you should be back to the Sage command line. From the Sage notebook interface, giving users a shell can open the door to many security issues. The issue becomes clear when you are managing a public Sage notebook server.
Or how do you view the Sage standard documentation from the command line? To view the documentation of function foo(), from the Sage command line do
To view the source code of function bar(), from the Sage command line do
To view the Sage tutorial, do
To view the Sage reference manual, do
How do you find that function you are looking for? Do
sage: search_src("the function name") # or sage: search_doc("the function name") # or sage: search_def("the function name")