ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 03 Aug 2020 16:10:57 -0500Configuring an arara rule of sagetex on Windows 10https://ask.sagemath.org/question/52840/configuring-an-arara-rule-of-sagetex-on-windows-10/ This question has been cross-posted on tex.sx here https://tex[dot]stackexchange[dot]com/q/557131/2288.
----------
When using the following `sagetex.yaml` arara rule
!config
# SageTeX-Rule for arara.
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Program Files\\SageMath 9.1\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Program Files/SageMath 9.1/runtime/opt/sagemath-9.1/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(reference) + ".sagetex.sage"));
}
to compile the following document
% arara: lualatex
% arara: sagetex
% arara: lualatex
\documentclass{article}
\usepackage{sagetex}
\begin{document}
Using Sage\TeX, one can use Sage to compute things and put them into your \LaTeX{} document. For example, there are
$\sage{number_of_partitions(1269)}$ integer partitions of $1269$.
You don't need to compute the number yourself, or even cut and paste it from somewhere.
Here's some Sage code:
\begin{sageblock}
f(x) = exp(x) * sin(2*x)
\end{sageblock}
The second derivative of $f$ is
\[
\frac{\mathrm{d}^{2}}{\mathrm{d}x^{2}} \sage{f(x)} =
\sage{diff(f, x, 2)(x)}.
\]
Here's a plot of $f$ from $-1$ to $1$:
\sageplot{plot(f, -1, 1)}
\end{document}
I get this error
> SyntaxError: (unicode error)
> 'unicodeescape' codec can't decode
> bytes in position 2-3: truncated
> \UXXXXXXXX escape
So, what should be changed in both the arara rule and, consequently, the following command to make everything work?
"C:\Program Files\SageMath 9.1\runtime\bin\bash" -l "C:/Program Files/SageMath 9.1/runtime/opt/sagemath-9.1/sage" -c "os.chdir('C:\Users\Diaa\Desktop\Test'); load('testsagetex.sagetex.sage')"DiaaMon, 03 Aug 2020 16:10:57 -0500https://ask.sagemath.org/question/52840/Print (input/)output numbershttps://ask.sagemath.org/question/51536/print-inputoutput-numbers/Hey,
when I use the sage it looks like this:
`sage: factor(100)`<br>
`2^2 * 5^2`<br><br>
`sage: kronecker_symbol(3,5)`<br>
`-1`<br><br>
`sage: %hist`<br>
`factor(100)`<br>
`kronecker_symbol(3,5)`<br>
`%hist`
How can I get sage to look like this: (?)
`sage: factor(100)`<br>
`_1 = 2^2 * 5^2`<br><br>
`sage: kronecker_symbol(3,5)`<br>
`_2 = -1`<br><br>
`sage: %hist`<br>
`1: factor(100)`<br>
`2: kronecker_symbol(3,5)`<br>
`3: %hist`
And can i edit the prompt to view the input number? I.e. to look like
`sage[2]: kronecker_symbol(3,5)`
If somebody has an idea please let me know.
Thanks a lot!jbirnickSun, 24 May 2020 11:06:12 -0500https://ask.sagemath.org/question/51536/Running Sage in command-linehttps://ask.sagemath.org/question/49078/running-sage-in-command-line/I know how to run a sage function in command-line:
[liuzw@ln01 ~]$ sage -c 'print(1+1)'
2
[liuzw@ln01 ~]
I know how to attach a code in command-line:
[liuzw@ln01 ~]$ sage fusion2.spyx
Compiling fusion2.spyx...
[liuzw@ln01 ~]$
But I don't know how to run a sage function after having attached a code:
[liuzw@ln01 ~]$ sage fusion2.spyx -c 'print(1+1)'
Compiling fusion2.spyx...
[liuzw@ln01 ~]$
Of course here `print(1+1)` is a trivial function to show an easy example.
Usually I need to use a function defined in the file `fusion2.spyx`.
**Question**: How to do this last step?Sébastien PalcouxThu, 19 Dec 2019 00:43:28 -0600https://ask.sagemath.org/question/49078/Can I alias a sage command?https://ask.sagemath.org/question/29376/can-i-alias-a-sage-command/If I type `alias`, I get a list of aliases, but they all look very "bashy", and not like sage commands. Can I set an alias for a sage command? Like `alias 'meh'='load("meh.sage")'`?
I have looked on this site, the "SAGE for newbies" document I found by Ted Kosan, doc.sagemath.org, and the general web, and I haven't found *any* documentation on aliases in sage.
When I run that, I get the following output:
sage: alias 'meh'='load("meh.sage")'
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-118-7d3257e61ed9> in <module>()
----> 1 get_ipython().magic(u'alias \'meh\'=\'load("meh.sage")\'')
/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2302 magic_name, _, magic_arg_s = arg_s.partition(' ')
2303 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2304 return self.run_line_magic(magic_name, magic_arg_s)
2305
2306 #-------------------------------------------------------------------------
/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2223 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2224 with self.builtin_trap:
-> 2225 result = fn(*args,**kwargs)
2226 return result
2227
/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/core/magics/osm.pyc in alias(self, parameter_s)
/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/core/magics/osm.pyc in alias(self, parameter_s)
117 # Now try to define a new one
118 try:
--> 119 alias,cmd = par.split(None, 1)
120 except TypeError:
121 print(oinspect.getdoc(self.alias))
ValueError: need more than 1 value to unpack
rexroniMon, 31 Aug 2015 13:42:56 -0500https://ask.sagemath.org/question/29376/Running several commands from command linehttps://ask.sagemath.org/question/42571/running-several-commands-from-command-line/You can make Sage evaluate a given Python expression by running `sage -c <your-command>` from command line. However, it seems that the `-c` parameter can only be given once. How do I make sage evaluate several commands in succession then?RegularUserTue, 12 Jun 2018 09:13:50 -0500https://ask.sagemath.org/question/42571/terminal for sage/ipython/virtualbox on Windows 10https://ask.sagemath.org/question/33457/terminal-for-sageipythonvirtualbox-on-windows-10/ Just started using sage on Windows 10. When I invoke VB and start Sage-7.2, it loads Jupyter. Right-Ctrl does not work. How do I get a terminal after Jupyter loads? I wish to use Sage interactively on the command line. Thanks, CCccc31807Thu, 19 May 2016 21:33:52 -0500https://ask.sagemath.org/question/33457/Keep Sage running in background linuxhttps://ask.sagemath.org/question/38057/keep-sage-running-in-background-linux/I need to be able to execute sage commands via the command line without opening the Sage shell. I am currently doing this through "sage -c 'cmd'". The issue I have is that this forces all of sage to boot up, run the command, and then shutdown. Something simple as "sage -c "print(derivative(5*x,x))" takes 3-4 seconds to run. How would I speed this up? My idea was to somehow run Sage in the background and be able to feed it input but I am not sure how to do that. I am feeding the command line input from an external program.
EDIT:
I found something that may be useful here:
https://ask.sagemath.org/question/23431/running-sage-from-other-languages-with-higher-performance/
The solution this user provides is creating a python socket server to constantly be running sage and pass along input for evaluation into it. The code isn't exactly daemonized so I will attempt to do that later. I will report on if I got it to work.AndriyThu, 22 Jun 2017 13:37:19 -0500https://ask.sagemath.org/question/38057/atempt to do an addition with sagehttps://ask.sagemath.org/question/37151/atempt-to-do-an-addition-with-sage/ Hi
Someone would have the kindness to tell me how I can get the prompt **sage:**
I ambition, But I know I place the bar very high, not sure my little brain could reach that goal ! :-) to be able to add 1 + 1 on sage before the end of the day,
Like in the tutorial. I've been searching for half an hour.
I'm using VM sage-7.6.ova on VirtualBox.
ortolljMon, 03 Apr 2017 08:53:43 -0500https://ask.sagemath.org/question/37151/scripting (jupyter) notebookshttps://ask.sagemath.org/question/36875/scripting-jupyter-notebooks/Is there a way to execute a notebook file from the command line and automatically run all cells?
I am looking for something like
<pre>
sage -n jupyter --no-browser --script test1.ipynb
</pre>
however, `--script` is deprecated and `--no-browser` doesn't stop sage from opening a browser window for me. Worse yet, the cells in the notebook are not executed automatically either.
Background: My aim is to automatically run a set of different sage notebooks (which are basically scripts to generate data files) in a directory, similar to how you would compile various source files to binaries. The notebooks are a collaborative effort and in a version control system and every developer would be able to generate those data files locally on their machine by running some shell script or through a Makefile.
BjörnThu, 09 Mar 2017 04:27:32 -0600https://ask.sagemath.org/question/36875/How to literally print the output of tab completion in the command line?https://ask.sagemath.org/question/36462/how-to-literally-print-the-output-of-tab-completion-in-the-command-line/ Some time ago, I realized that pressing tab after a "." in the command line opens a new window where it is possible to scroll through the possible methods to call on this object.
Is it still possible to print inside the terminal all the possibilities?
Even if I modify the preferences of the command line from "readline" to "multicolumns", it still does not show much of the possibilities and sometimes seeing all of them at once is faster than scrolling.
Is it possible to get this feature back as before somehow?jipilabMon, 06 Feb 2017 04:17:02 -0600https://ask.sagemath.org/question/36462/Executing Sage with arguments from C with exec familyhttps://ask.sagemath.org/question/33795/executing-sage-with-arguments-from-c-with-exec-family/Hi, I'm writing a piece of software that lets me distribute executions of the type *same program-multiple data* in a computing server through PVM. This software has a module for Maple executions, one for C, one for Python and one for Pari. Now I'm trying to write the code for a Sage module.
The idea is that i have a master who sends tasks to several slaves, each task consists on executing the same Sage script but using different values for the variables `taskId` and `taskArgs`. The slave forks a process and executes a chunk such as this one:
// NULL-terminated array of strings
char **args;
int nargs=2;
args = (char**)malloc((nargs+1)*sizeof(char*));
// Do not malloc for NULL
for (i=0;i<nargs;i++)
args[i] = malloc(BUFFER_SIZE);
// Fill up the array with strings
sprintf(args[0],"sage");
sprintf(args[1],"-c \"taskId=%d;taskArgs=[%s];load('%s');\"",taskNumber,arguments,inp_programFile);
args[2] = NULL;
// Call the execution and check for errors
err = execvp(args[0],args);
perror("ERROR:: child Sage process");
exit(err);
For example, an instance of this code would be executing
`sage -c "taskId=71;taskArgs=[0,73,74,0];load('test.sage')"`,
where *test.sage* prints the arguments or whatever.
Now comes the question. If i execute the previous command from the command line i get the expected result (the two prints). However, if i execute my C program (which works corectly for Maple, C, Python and Pari using a very similar approach) i get this error:
`sage-run received unknown option: -c "taskId=71;taskArgs:=[0,73,74,0];load('test.sage')"`
I have already tried changing the double quotes `"` to single quotes `'`, using only a single, very simple argument from C (e.g. `sage -c "print(1);"`), all to no avail.
Am I missing something? How can the same command work from the command line but not when i use `execvp` from within C?
Thanks in advanced for any help!
----------
(I know I could adapt my Python module to read Sage scripts, but i want a *standalone* module for Sage because the Python one uses `sys.args` and I'd like to keep the Sage scripts as simple as possible for the users of the software)osrWed, 15 Jun 2016 07:16:59 -0500https://ask.sagemath.org/question/33795/Using SageMath in a Unix pipe without creating fileshttps://ask.sagemath.org/question/33612/using-sagemath-in-a-unix-pipe-without-creating-files/I would like to run Sage as the middle of a Unix pipe, so that some program generates Sage input, pipes it to Sage, and another program reads the output.
$ MyProgram1 | sage | MyProgram2 > final_output
In principle, MyProgram1 will run for days, weeks or months producing hundreds of millions of inputs for Sage to process, while MyProgram2 will look out for the rare successful inputs.
I know that if I have a small amount of input, then I can create a file, say "input.sage" and then run "sage input.sage", but this creates an auxiliary file "input.sage.py" before it does anything else, and so is not suitable for hundreds of millions of inputs/outputs.GordonWed, 01 Jun 2016 03:42:13 -0500https://ask.sagemath.org/question/33612/successive calls to maximahttps://ask.sagemath.org/question/26728/successive-calls-to-maxima/I have found, and have read, a bit on calling Maxima from Sage but I have only seen simple one-time calls like
maxima.eval('4*x');
What I want to do is this (which is a *.sage file I call from the terminal using ./sage file.sage).
print("In Sage input file");
d = maxima.eval('halt (r,s,zeta,rho) := (1-Q*rho^r)-zeta*rho^s*(1-rho^r)');
d2 = maxima.eval('elem([2,e12,e22],elem([2,e11,e21],halt(2,1,zeta1,rho11)+diff(halt(2,1,zeta2,rho12),rho12)+halt(2,1,zeta2,rho22),[rho11,rho21]),[rho12,rho22])');
print d2;
d3 = maxima.eval('subst(R,e11,d2');
print d3;
But `print d3' just gives me 'd2'.... I'm sure this is very very simple but I haven't found it yet.
Thanks!
natepowerTue, 05 May 2015 14:57:33 -0500https://ask.sagemath.org/question/26728/what is "....:"?https://ask.sagemath.org/question/25800/what-is/I have just installed Sage and tested it with some equations. But I found a problem that the left side of the command line changes from "sage: " to "....: ". It was the case when I typed the following code.
f(x)=2.4/x^2*(1-e^(-x/50))
Could anyone let me know what "....:" means? And how to recover the normal command line in order to use Sage again? With "....: " it seems that Sage never work.
Thank you.
NownuriWed, 11 Feb 2015 00:03:57 -0600https://ask.sagemath.org/question/25800/Virtualbox and Chromiumhttps://ask.sagemath.org/question/24771/virtualbox-and-chromium/ Hi, I've been using sage.5.11 on VirtualBox running on a Windows 7 computer. I would like to know a couple of things:
1. How to go from the Notebook mode to a command line mode
2. How to return to the Notebook mode after I clicked on a link to view truncated output
3. Booting into Command Line SAGE instead of Notebook mode as it is doing currently
Thanks for your help in advance.BlackadderMon, 03 Nov 2014 20:24:20 -0600https://ask.sagemath.org/question/24771/Running Sage from other languages with high(er) performance?https://ask.sagemath.org/question/23431/running-sage-from-other-languages-with-higher-performance/I'm in the process of creating af CAS tool that uses Sage as the underlying math engine. It's a web application, so most of the code is HTML/Javascript and some underlying PHP from which I'd like to use Sage. Currently I've resorted to the `-c` command line option and executing it through PHP with `exec()`.
This approach is extremely slow (takes several seconds and CPU load is fairly high). This is - as far as I'm aware - a result of Sage having to load all its libraries each time it's run.
Is there any way I can optimize this approach? I would prefer an approach similar to the `-c` option where I can just send a command and read the printed result.
I have no issues writing a wrapper in C (or Python if neccessary), nor working with sockets (if any are available) provided it can be done as simple as the `-c` option (the WebSocket messages seen in Sage Cell seems too much trouble to do manually).
What I need to know is mostly whether or not it's even possible, if so then where to start otherwise I'd like to know if there are any alternative approaches?
**Why not use Sage Cell/Cloud?**
Several reasons:
- I don't have complete control of the UI, so I can't actually embed a Sage Cell.
- The CAS tool is part of a much larger system with other services sharing resources.
- Both are a bit overkill for the job since they include a UI and webserver - I just need to send the command and read the response.WoodgnomeWed, 16 Jul 2014 04:45:14 -0500https://ask.sagemath.org/question/23431/Running sage on an input file via the command linehttps://ask.sagemath.org/question/10793/running-sage-on-an-input-file-via-the-command-line/I have a file abc.sage that contains the commands plot(x^2).show(). From the command line I run "sage abc.sage". The plot command is executed, the viewer appears, and I get a message that a certain png file is not present where expected. Any solutions?sjrMon, 02 Dec 2013 02:11:36 -0600https://ask.sagemath.org/question/10793/MPI4Py, MPI in Sagehttps://ask.sagemath.org/question/9813/mpi4py-mpi-in-sage/We've tried following the directions at <http://www.sagemath.org/doc/numerical_sage/mpi4py.html> and checked the forum at <http://ask.sagemath.org/question/14/what-are-my-best-options-for-taking-advantage-of>, but we're still having trouble implementing MPI in Sage.
Ideally, we'd prefer to implement MPI from a notebook instead of the command line, but that doesn't seem to be an option with MPI4Py. When we tried to use the command line, we had trouble importing the packages from the first link.
So, we were wondering:
1. Is there an alternative to MPI which allows us to exploit multiple cores (or a cluster) from notebook form?
2. Does anybody have an easier-to-understand set of instructions than the ones listed above for using MPI4Py?jquigleySat, 16 Feb 2013 08:50:55 -0600https://ask.sagemath.org/question/9813/How can I open a program written in sage, in the Terminal of sage?https://ask.sagemath.org/question/9800/how-can-i-open-a-program-written-in-sage-in-the-terminal-of-sage/I have a file which is written in sage language and I want to open it in Terminal of sage,could you please inform me how can I open it,and how can I run it?m martaTue, 12 Feb 2013 17:02:52 -0600https://ask.sagemath.org/question/9800/Which variables are automagically defined in the sage shell?https://ask.sagemath.org/question/9665/which-variables-are-automagically-defined-in-the-sage-shell/I'm using the sage-5.5 command line and some variables are automatically declared. For instance I can do
f = x^2
but not
f = t^2
My question: How does this come about? Which variables are defined like this? Where is this documented?
ThomasThu, 03 Jan 2013 01:21:01 -0600https://ask.sagemath.org/question/9665/Running Sage from the commad line in Ubuntu 12.04https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/I'm relatively new to Sage and to GNU/ Linux. Sorry in advance if this question seem silly. But I need to learn how to do this. Here is my problem:
I have Sage installed from source in /usr/local/src. So every time I want to run Sage I have to type on the terminal
$ cd /usr/local/src/sage-5.4.1/
and once inside this directory, I have to type
./sage
How can I start Sage directly at the prompt $ just by typing "sage"?
Thanks a lot for the answer.
jdiosesTue, 25 Dec 2012 13:00:15 -0600https://ask.sagemath.org/question/9650/Searching through completions.https://ask.sagemath.org/question/9639/searching-through-completions/Hello all!
Is there a way of searching through the possible completions while using sage in a terminal?
Eg. If `g` is a `Graph`, then `g.<TAB>` yields more than 200 possible completions.
Does anyone know of a way to get only those completions containing a certain string, say `path`, without leaving the terminal? Here one would expect to get the 12 (or so) methods containing the word `path`, none of which have `path` as a prefix.
Thanks :)
fidbcSun, 16 Dec 2012 09:55:17 -0600https://ask.sagemath.org/question/9639/How to get command line in VirtualBox?https://ask.sagemath.org/question/9102/how-to-get-command-line-in-virtualbox/I have just installed VirtualBox and Sage on my Windows machine. I want to install the sage-combinat queue. However, when I start Sage in the VirtualBox, it goes to a graphical notebook interface. How can I get to a command line to install the queue?
Pardon if the question is unclear; I'm not very skilled with manipulating computers.
ec92Thu, 21 Jun 2012 15:02:42 -0500https://ask.sagemath.org/question/9102/How "run a .sage file"?https://ask.sagemath.org/question/8915/how-run-a-sage-file/I'm trying to use the sagetex style file in LaTeX. After trying to process the example.tex file provided with sagetex, I get error messages in the log that say to "Run Sage on example.sagetex.sage".
On my OS X system, Sage is installed as a clickable .app. After I start the app, I know how to start a Terminal command session of Sage by using the right-click menu from the Sage icon in the dock.
But how do I process such a .sage file in there?murraySun, 22 Apr 2012 08:56:12 -0500https://ask.sagemath.org/question/8915/Notebook hangs when run from command linehttps://ask.sagemath.org/question/8901/notebook-hangs-when-run-from-command-line/I'm getting comfortable with Sage with my own work, and have tasked my students with registering at sagenb.org and working through some problems. I would like to run a Sage server from my desktop machine at home to access when I'm out, instead of trying to synchronize my worksheets.
I'm running OS X 10.7 on a Mac Mini, and have properly forwarded the appropriate port. When I run sage in the Terminal, then the command
notebook(interface='', server_pool=['sage1@localhost'], accounts=False, secure=True)
things seem to work smoothly. I can access the login screen from a remote machine, run worksheets, and evaluate commands. However, when I try to run sage from the command line with
...sage --notebook interface='' server_pool=['sage1@localhost'] accounts=False secure=True
I'm still able to access the login screen from a remote machine and run worksheets, but when I try to evaluate something it hangs. The command I'm using is something I put together from pieces I found on the Sage wiki, but I admit even after reading a number of tutorials over and over I'm still not sure what all the parameters mean.
I'd like to run this server at boot, so I'm calling it via a bash script. If there's another way to do things I'm all ears. Does anyone have any suggestions?ctennenhWed, 18 Apr 2012 04:46:46 -0500https://ask.sagemath.org/question/8901/Script stops working when imported to sage terminal ("plot" not defined)https://ask.sagemath.org/question/8811/script-stops-working-when-imported-to-sage-terminal-plot-not-defined/**EDIT:** OK, so basically, the Sage command line is not recognizing *any* sage commands (sqrt, etc) when they are contained in an imported .sage file. It's as if when I import a file to Sage, it doesn't read it using the Sage library. Is there something I have to add to the header of a .sage file for it to be read properly?
***
**Old message:**
So everything works fine in the sage notebook, and even if I pretty much rewrite the same commands in the Sage terminal. So it can't be a problem with the script.
But when I copy, paste and save the whole script as a standalone `file.sage`, and then try
run file.sage
... suddenly:
---> 30 multiPlot = plot(graphs, (x, 0, times[len(times)-1]+3), ymin=0)
31
32
NameError: name 'plot' is not defined
Why doesn't it read "plot" correctly and expect me to define it?fakaffWed, 21 Mar 2012 12:46:24 -0500https://ask.sagemath.org/question/8811/Reinstall sage-mode after emacs upgradehttps://ask.sagemath.org/question/8761/reinstall-sage-mode-after-emacs-upgrade/Hi, I'm trying to reinstall sage mode after an upgrade of emacs (modules need to be byte-compiled with the new version of emacs).
sage -i sage-mode-0.6
tells me that it is already installed and does nothing.ThomasThu, 01 Mar 2012 02:04:07 -0600https://ask.sagemath.org/question/8761/CLI System Requirementshttps://ask.sagemath.org/question/8597/cli-system-requirements/Can I run Sage using only the command line (not the notebook interface) on my extremely low end system?
My Specs
cpu: 433MHz Intel Celeron
ram: 256MB
hdd: 13GB
Debian Squeeze LXDE
I currently am running Maxima (maxima.sourceforge.net) on this computer. I generate scripts in a text editor. Then I run Maxima in a terminal and use a command to run the script. I've been trying to learn/review a couple of classes (signals & systems, analog and digital communications) and Maxima has been an excellent tool. I was getting so bogged down in integration and trig IDs.
I'm not an advanced user but I'm at the point where I would like to tinker some of the Maxima packages. And I found they are written in Lisp which I am unfamiliar with. I've been reading/doing lisp tutorials and stumbled across a discussion about Sage. It is my understanding that Sage uses Maxima and it has a CLI. It is also my understanding that Sage is built using Python (which I know a little better than lisp)...and I could write scripts using python.
I couldn't find Sage in the Debian repo. And after reading some of the Sage website it looks like they recommend 2GB of ram.
Before I go thru the process of installing Sage and all of the programs it needs (without my Synaptic security blanket), I would like to get some input. Especially from folks who use the CLI. My hope is that the command line is *much* less cpu/ram intensive than the fantastic looking GUI.
Worst comes to worst I'll just have to learn Lisp. I'm sure Lisp *is* the reason Maxima even runs on my 12 year old system.
Thanks.joeTue, 27 Dec 2011 13:08:42 -0600https://ask.sagemath.org/question/8597/How do do more complex shell commands in Sage?https://ask.sagemath.org/question/8266/how-do-do-more-complex-shell-commands-in-sage/According to [the tutorial](http://www.sagemath.org/doc/tutorial/interactive_shell.html), I can do things like `!ls` inside the Sage shell (in fact, here `ls` works).
But
echo $PATH
doesn't work whether I prepend a `!`, put it in quotes, whatever. How do I get such things to work, if at all? Is `PATH` just not defined in the Sage session?
(Secondarily, I'm trying to figure out how to put things in a path of a Sage session; `sys.path` seems to be the place to do it, but I'm not 100% sure of that.)kcrismanTue, 09 Aug 2011 05:38:25 -0500https://ask.sagemath.org/question/8266/sage, can't run command at notebookhttps://ask.sagemath.org/question/8236/sage-cant-run-command-at-notebook/I have some Python scripts and I need to run them under notebook.
I run the scripts in %Sage -python <scriptname>.py. It works fine
If I run it under sage shell by execfile('/foo/bar.py'). It works fine as well
But if I run execfile('/foo/bar.py') in Sage Notebook, it complains about
...cannot open shared object file: No such file or directory
It appears to me that the notebook can't find the lib. Does Sage and SageNB
uses a separate Library-path and Run-path?tedTue, 19 Jul 2011 10:36:29 -0500https://ask.sagemath.org/question/8236/