ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 21 Apr 2016 22:44:32 -0500What's a common way to save and load a list?http://ask.sagemath.org/question/33179/whats-a-common-way-to-save-and-load-a-list/I have calculated a list through a long calculation to do some other calculations with it. So I saved the list in a .txt file and in the file it looks like this:
[[[-1/10, 1.02421477975960],
[-99/1000, 1.02369404664481],
[-49/500, 1.02317986236459],
[-97/1000, 1.02267219319285],
...
Now that I want to load it again, I realized that I have to strip the `\n`'s and then get rid of the brackets and extra commas etc. While I still have to do this for the current file, I want to know what are the common ways to save a list (and other similar python objects) so that I don't have to do all of this again? In other words:
a. How can I save the each element of a list in a line of a file?
That is, to get something like:
-1/10, 1.02421477975960
-99/1000, 1.02369404664481
-49/500, 1.02317986236459
-97/1000, 1.02267219319285
...
b. How can I save a list (higher dimensional array) into a file and then read it. I tried the following but I seem to be unable to read it:
L = [ [ [1,2], [1,2] ], [ [1,2,3], [1,3], [1,2,3] ], 1 ]
out = file('out','w')
out.write(str(L))
out.close()
And then
L = open('out','r')
to only get
'[ [ [1,2], [1,2] ], [ [1,2,3], [1,3], [1,2,3] ], 1 ]'k1monfaredThu, 21 Apr 2016 22:44:32 -0500http://ask.sagemath.org/question/33179/Why spyx translates sage.all (via Google) ?http://ask.sagemath.org/question/10310/why-spyx-translates-sageall-via-google/My mother tongue in French and I regularly use Google translator to write my topics in English.
For a topic on this site, I discover that Google translates, from any language to French, sage.all by spyx, and also spyx by sage.all
It's certainly a joke of a French Sage developer close to Google..., isn't it ?
Who is it ? Why this joke ? Are there others such funny things ?
Sébastien PalcouxTue, 02 Jul 2013 05:33:23 -0500http://ask.sagemath.org/question/10310/Would you agree to migrate to StackExchange if it becomes open-source ? (if it's technically possible)http://ask.sagemath.org/question/10303/would-you-agree-to-migrate-to-stackexchange-if-it-becomes-open-source-if-its-technically-possible/**Meta-question**
I rub salt in the wound on [meta.stackoverflow](http://meta.stackoverflow.com/) about the question of Open Sourcing StackExchange, see [here](http://meta.stackoverflow.com/questions/186641/are-there-noble-reasons-for-stackexchange-does-not-become-open-source) (it currently scores -10, so some help would be welcome...).
The motivation of my previous topic is that I read on [ask.sagemath here](http://ask.sagemath.org/question/2110/stackexchange) that some people are not agree to migrate to StackExchange because it in **not** open source (not yet...).
So I ask to you the following question:
If StackExchange becomes open-source and if it's technically possible to migrate to it :
(see @kcrisman comment and this [post](http://askbot.org/en/question/11146/is-it-technically-possible-to-migrate-to-stackexchange-if-it-becomes-open-source/))
> Would you agree to migrate to
> StackExchange ?Sébastien PalcouxMon, 01 Jul 2013 04:17:13 -0500http://ask.sagemath.org/question/10303/Sage for physicistshttp://ask.sagemath.org/question/10093/sage-for-physicists/I am a physics undergrad and thinking of learning a CAS. Though, mathematica is a standard choice, I would prefer a free open source software, because of a fetish, and the fact that I can't use mathematica outside my university. Is Python Sage used by physicists? Does it have the same functionality as mathematica.
Could you recommend me an online guide/manual or a book which teaches Sage with an emphasis for physics applications i.e. an equvalent to the [A Physicist's guide to Mathematica](http://www.amazon.com/dp/0126831920/?tag=stackoverfl08-20) book?dickfeynmanMon, 06 May 2013 12:10:40 -0500http://ask.sagemath.org/question/10093/Stackexchangehttp://ask.sagemath.org/question/9662/stackexchange/Has anyone considered creating a stackexchange site for Sage?
It appears to me that stackexchange is the most popular site for such things and would definitely not hurt to Sage popularity. In addition stackexchange community is larger and the software in question is much more flexible and readable.
I'd definitely be more motivated to use stackexchange than ASKBOT.JernejSat, 29 Dec 2012 02:50:33 -0600http://ask.sagemath.org/question/9662/Rstat -interpreter and Haskell -interpreters to Sage?http://ask.sagemath.org/question/9379/rstat-interpreter-and-haskell-interpreters-to-sage/I use mostly R and Python but interested in Haskell. Now I have Sage in iPad, more [here](http://math.stackexchange.com/questions/193072/ipad-for-reading-textbooks-and-writing-math-by-hand/204393#204393), and totally novel idea whether I could get R and Haskell to iPad? You can find the iOS Sage code [here](https://bitbucket.org/gvol/sage-iphone-app). I had an impression that Sage is a bunch of different softwares.
1. Where can I find Sage's dependencies?
2. Is it possible to run R -code or Haskell -code in Sage?hhhTue, 02 Oct 2012 08:08:28 -0500http://ask.sagemath.org/question/9379/Why would someone use .sage vs .py?http://ask.sagemath.org/question/9354/why-would-someone-use-sage-vs-py/Why would someone use .sage vs .py? What's recommended? What are the pros and cons? There are questions people ask like: "This can be done in Sage but I can't do it in my python file?" Why would they do anything in python if they could just do it in Sage?SLOtoSFWed, 26 Sep 2012 17:37:21 -0500http://ask.sagemath.org/question/9354/double-click sws on all platforms?http://ask.sagemath.org/question/9149/double-click-sws-on-all-platforms/In the spirit of MathOverflow, I have a "soft question".
At [Trac 11026](http://trac.sagemath.org/sage_trac/ticket/11026) it looks like Ivan has finally heroically licked the double-click issue for a Sage worksheet on Mac. This is a really great addition; I've been told on more than one occasion that for many institutional settings, not having this makes Sage a non-starter.
(Some of us respectfully disagree, but if you have a model that works, switching to the server model could be less than useful, and that share and publish are the only two good options there limits things somewhat.)
So, soft question: What would it take to have something similar on Windows, with the current virtual machine or even with Cygwin, if needed? Does this question even make sense on the zillions of distros of Linux? HP-UX, with its thriving calculus computer lab constituency?kcrismanThu, 12 Jul 2012 15:34:38 -0500http://ask.sagemath.org/question/9149/