On Mon, Nov 08, 2010 at 07:24:53PM +0000, David Kirkby wrote:
> I was trying to execute a large script, which I had generated
> automatically with a view to testing Sage at integrating and
> differentiating random polynomials.
> 
> The script looks a bit like this, but has many entries, with each
> polynomial generated randomly.
> 
> f1=+2-2*x+2*x^2+2*x^3+4*x^4-1*x^5+3*x^6
> f1
> intf1=integrate(f1,x)
> f2=diff(intf1,x)
> ans=f1.full_simplify() - f2.full_simplify()
> if  ans != 0:
>      print "Error when integrating ", (f1), " answer got was ", (ans)
> else:
>      print "OK integrating ", (f1)
> 
> 
> etc
> 
> I used
> 
> $ sage < scriptfile
> 
> but it eventually fails with:

<snip>
> WARNING: Output cache limit (currently 1000 entries) hit.
> Flushing cache and resetting history counter...
> The only history variables available will be _,__,___ and _1
> with the current result.
> sage: sage: sage: sage: ....: ....: ....: ....: OK integrating  x^6 -
> 2*x^5 + 2*x^4 - 3*x^3 - x^2 - x + 1
> sage:
> Exiting Sage (CPU time 0m52.12s, Wall time 1m30.11s).
> Exiting spawned Maxima process.

Did it actually fail, or just finish?

 
> Any ideas how I can process a script which has thousands or even
> perhaps millions of lines?

Rename scriptfile to scriptfile.sage and run 'sage scriptfile.sage'.

 
> Any idea why there are so many Sage prompts?

ipython and sage don't detect when stdin isn't a terminal and display a prompt
for each input line.

-Willem Jan

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to