Re: [sage-support] Re: Jacobi sn

2012-11-20 Thread Jan Groenewald
Hi

I can also do this (Note the only change I - %i):

sage: maxima(jacobi_sn(1.2 + 3.7081493546*I, 0.500))
jacobi_sn(3.7081493546*I+1.2,0.5)
sage: maxima(jacobi_sn(1.2 + 3.7081493546*%i, 0.500))
.8877154886192803-9.851415480779732e-13*%i
sage:

Regards,
Jan





On 20 November 2012 09:25, Justin C. Walker jus...@mac.com wrote:


 On Nov 19, 2012, at 22:36 , Jan Groenewald wrote:

  On 16 September 2012 08:08, Robert Dodier robert.dod...@gmail.com
 wrote:
 
  On 2012-09-16, kcrisman kcris...@gmail.com wrote:

 Using Mac OS X, 10.6.8.  Sage 4.8 has maxima 5.23 (maxima-5.23.2.p3.spkg);
 5.0-beta2 has maxima 5.26.

  Maxima 5.24.0 http://maxima.sourceforge.net
  using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL)
  Distributed under the GNU Public License. See the file COPYING.
  Dedicated to the memory of William Schelter.
  The function bug_report() provides bug reporting information.
  (%i1) u : 1.2 $
  (%i2) m : 0.5 $
  (%i3) jacobi_sn (u, m);
  (%o3)  0.88771548861928
  (%i4) jacobi_sn (u + 2 * %i * elliptic_kc (1 - m), m);
  (%o4)0.88771548861928 - 1.7301614091485549E-15 %i

 I get (maxima 5.26) 0.88771548861928 - 1.7919528880467195e-15 %i


  Either that was a regression specifric to maxima 5.26, or this problem is
  particular
  to the sage interface to maxima. Original problem:
 
  0 jan@muizenberg:/var/autofs/misc/home/jan$sage
  --
  | Sage Version 5.4, Release Date: 2012-11-09 |
  | Type notebook() for the browser-based notebook interface.|
  | Type help() for help.|
  --
  sage: u=1.2
  sage: m=0.5
  sage: jacobi('sn',u,m)
  0.887715488619
  sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m)
  jacobi_sn(1.2 + 3.7081493546*I, 0.500)
  sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m))

 With sage-5.0-beta2, the above is duplicated, except that the last line
 has been going (and going, and ...) for several minutes now, with no signs
 of abating.  It's adding small increments of memory, second by second...

 Justin

 --
 Justin C. Walker, Curmudgeon at Large
 Institute for the Absorption of Federal Funds
 ---
 Like the ski resort full of girls hunting for husbands
 and husbands hunting for girls, the situation is not
 as symmetrical as it might seem.
   - Alan MacKay
 --

 --
 You received this message because you are subscribed to the Google Groups
 sage-support group.
 To post to this group, send email to sage-support@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-support+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-support?hl=en.





-- 
  .~.
  /V\ Jan Groenewald
 /( )\www.aims.ac.za
 ^^-^^

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Jacobi sn

2012-11-20 Thread Burcin Erocal
On Mon, 19 Nov 2012 23:25:34 -0800
Justin C. Walker jus...@mac.com wrote:

 
 On Nov 19, 2012, at 22:36 , Jan Groenewald wrote:
 
  On 16 September 2012 08:08, Robert Dodier robert.dod...@gmail.com
  wrote:
  
  On 2012-09-16, kcrisman kcris...@gmail.com wrote:
 
  Either that was a regression specifric to maxima 5.26, or this
  problem is particular
  to the sage interface to maxima. Original problem:
  
  0 jan@muizenberg:/var/autofs/misc/home/jan$sage
  --
  | Sage Version 5.4, Release Date:
  2012-11-09 | | Type notebook() for the
  browser-based notebook interface.| | Type help() for
  help.|
  --
  sage: u=1.2 sage: m=0.5
  sage: jacobi('sn',u,m)
  0.887715488619
  sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m)
  jacobi_sn(1.2 + 3.7081493546*I, 0.500)
  sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m))
 
 With sage-5.0-beta2, the above is duplicated, except that the last
 line has been going (and going, and ...) for several minutes now,
 with no signs of abating.  It's adding small increments of memory,
 second by second...

Numerical evaluation for this function is done by the _evalf_()
function defined on line 489 of sage/functions/special.py. The last
line of that function is:

return parent(maxima(%s, numer%self._maxima_init_evaled_(*args)))

Here is what happens:

sage: maxima(jacobi_sn(1.2000 + 3.7081493546027438*I,
0.5), numer)
jacobi_sn(3.7081493546027438*I+1.2,0.5)


Trying to convert this to an element of RR, or whatever the chosen
parent for the numerical evaluation is, calls this function again.

The problem is with the conversion of the argument to maxima in the
_maxima_init_evaled_ function. I will open a ticket and try to provide
a patch today. Gotta run now.


Cheers,
Burcin

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Jacobi sn

2012-11-20 Thread Burcin Erocal
On Tue, 20 Nov 2012 09:25:21 +0100
Burcin Erocal bur...@erocal.org wrote:

 On Mon, 19 Nov 2012 23:25:34 -0800
 Justin C. Walker jus...@mac.com wrote:
 
  
  On Nov 19, 2012, at 22:36 , Jan Groenewald wrote:
  
   On 16 September 2012 08:08, Robert Dodier
   robert.dod...@gmail.com wrote:
   
   On 2012-09-16, kcrisman kcris...@gmail.com wrote:
  
   Either that was a regression specifric to maxima 5.26, or this
   problem is particular
   to the sage interface to maxima. Original problem:
   
   0 jan@muizenberg:/var/autofs/misc/home/jan$sage
   --
   | Sage Version 5.4, Release Date:
   2012-11-09 | | Type notebook() for the
   browser-based notebook interface.| | Type help() for
   help.|
   --
   sage: u=1.2 sage: m=0.5
   sage: jacobi('sn',u,m)
   0.887715488619
   sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m)
   jacobi_sn(1.2 + 3.7081493546*I, 0.500)
   sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m))
  
  With sage-5.0-beta2, the above is duplicated, except that the last
  line has been going (and going, and ...) for several minutes now,
  with no signs of abating.  It's adding small increments of memory,
  second by second...
 
 Numerical evaluation for this function is done by the _evalf_()
 function defined on line 489 of sage/functions/special.py. The last
 line of that function is:
 
 return parent(maxima(%s, numer%self._maxima_init_evaled_(*args)))
 
 Here is what happens:
 
 sage: maxima(jacobi_sn(1.2000 + 3.7081493546027438*I,
 0.5), numer)
 jacobi_sn(3.7081493546027438*I+1.2,0.5)
 
 
 Trying to convert this to an element of RR, or whatever the chosen
 parent for the numerical evaluation is, calls this function again.
 
 The problem is with the conversion of the argument to maxima in the
 _maxima_init_evaled_ function. I will open a ticket and try to provide
 a patch today. Gotta run now.

Apparently, this was #7557 all along. I uploaded a patch. Please review.

http://trac.sagemath.org/sage_trac/ticket/7557


Cheers,
Burcin

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] How do you stop sage in the middle of a block?

2012-11-20 Thread LFS
How do you get sage out of a loop early?
How do you get sage to totally stop in the middle of a block?

for n in (0..2):
  for m in (0..3):
   p=2*m
   print p
   if p==2:
 print 'I want out of loop'
 m=4
  if n==1:
 print 'I want to stop Sage'
print 'Did not stop Sage'

I want to get out of m loop if p=2 and totally stop Sage if n=1.
Thanks so much for any help.  Sorry if this is a dumb question. I looked 
and looked.

BTW: Someone might want to add this good tutorial: 
http://modular.math.washington.edu/msri06/stein/tut.pdf to 
http://ask.sagemath.org/question/1086/where-is-basic-tutorial-for-sage

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: How do you stop sage in the middle of a block?

2012-11-20 Thread Volker Braun
sage: for m,n in CartesianProduct(range(2), range(3)):
: p = 2*m
: print p
: if p==2:
: m = 4
: break
: if n==1:
: os._exit(0)
: 
0
0


On Tuesday, November 20, 2012 6:48:14 PM UTC, LFS wrote:

 How do you get sage out of a loop early?
 How do you get sage to totally stop in the middle of a block?

 for n in (0..2):
   for m in (0..3):
p=2*m
print p
if p==2:
  print 'I want out of loop'
  m=4
   if n==1:
  print 'I want to stop Sage'
 print 'Did not stop Sage'

 I want to get out of m loop if p=2 and totally stop Sage if n=1.
 Thanks so much for any help.  Sorry if this is a dumb question. I looked 
 and looked.

 BTW: Someone might want to add this good tutorial: 
 http://modular.math.washington.edu/msri06/stein/tut.pdf to 
 http://ask.sagemath.org/question/1086/where-is-basic-tutorial-for-sage


-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] How do you stop sage in the middle of a block?

2012-11-20 Thread William Stein
On Tue, Nov 20, 2012 at 10:48 AM, LFS lfahlb...@gmail.com wrote:
 How do you get sage out of a loop early?
 How do you get sage to totally stop in the middle of a block?

 for n in (0..2):
   for m in (0..3):
p=2*m
print p
if p==2:
  print 'I want out of loop'
  m=4
   if n==1:
  print 'I want to stop Sage'
 print 'Did not stop Sage'

Define a function as use return.



 I want to get out of m loop if p=2 and totally stop Sage if n=1.
 Thanks so much for any help.  Sorry if this is a dumb question. I looked and
 looked.

 BTW: Someone might want to add this good tutorial:
 http://modular.math.washington.edu/msri06/stein/tut.pdf to
 http://ask.sagemath.org/question/1086/where-is-basic-tutorial-for-sage

 --
 You received this message because you are subscribed to the Google Groups
 sage-support group.
 To post to this group, send email to sage-support@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-support+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-support?hl=en.





-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: How do you stop sage in the middle of a block?

2012-11-20 Thread LFS
Thank-you both! 
The 'break' did what I wanted for now and will test os._exit() in a bit.
Really appreciate your help.

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Don't know a PDF representation for alpha in graphics?

2012-11-20 Thread john_perry_usm
Hello

Finally got round to it.

On Thursday, November 15, 2012 11:44:36 AM UTC-6, Volker Braun wrote:

 I think I saw that before. Maybe converting coordinates to RDF works? 
 Please open a ticket if you can isolate a test case.


RDF doesn't work, either. float does.

I'm trying to write up a patch now. The alpha option should in fact be 
float, and not RFE or RDF, should it? I was thinking of making the change 
there, when the option is set, though I could also convert RDF etc. to 
float in the backend.

john perry 

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Don't know a PDF representation for alpha in graphics?

2012-11-20 Thread john_perry_usm
Jason

On Thursday, November 15, 2012 12:01:02 PM UTC-6, Jason Grout wrote:

 Can you get a small test case for us to play with? 


sage: p = disk((0,0),5,(0,pi/4),color='red')
sage: p += disk((0,0),5,(pi/4,pi/2),color='red',alpha=0.5)
sage: p.save(test.pdf) 

This fails for me. If I change the second line to end with 
...alpha=float(0.5)) then it works.

regards
john perry

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: Jacobi sn

2012-11-20 Thread Justin C. Walker
A quick follow-up:

On Nov 19, 2012, at 23:25 , Justin C. Walker wrote:
 On Nov 19, 2012, at 22:36 , Jan Groenewald wrote:
[snip]
 Using Mac OS X, 10.6.8.  Sage 4.8 has maxima 5.23 (maxima-5.23.2.p3.spkg); 
 5.0-beta2 has maxima 5.26.
[snip]
 
 sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m))
 
 With sage-5.0-beta2, the above is duplicated, except that the last line has 
 been going (and going, and ...) for several minutes now, with no signs of 
 abating.  It's adding small increments of memory, second by second...

This blew chunks, after a fairly long delay, as follows:

Traceback (most recent call last):
  File ipython console, line 1, in module
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/misc/functional.py,
 line 1275, in numerical_approx
return x._numerical_approx(prec)
  File expression.pyx, line 4082, in 
sage.symbolic.expression.Expression._numerical_approx 
(sage/symbolic/expression.cpp:18084)
  File expression.pyx, line 841, in 
sage.symbolic.expression.Expression._convert (sage/symbolic/expression.cpp:5122)
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/functions/special.py,
 line 510, in _evalf_
return parent(maxima(%s, numer%self._maxima_init_evaled_(*args)))
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py,
 line 277, in __call__
return Parent.__call__(self, x)
  File parent.pyx, line 1058, in sage.structure.parent.Parent.__call__ 
(sage/structure/parent.c:7886)
  File coerce_maps.pyx, line 82, in 
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ 
(sage/structure/coerce_maps.c:3344)
  File coerce_maps.pyx, line 77, in 
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ 
(sage/structure/coerce_maps.c:3247)
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py,
 line 305, in _element_constructor_
return x._complex_mpfr_field_( self )
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/interfaces/maxima_abstract.py,
 line 1291, in _complex_mpfr_field_
return C(self._sage_())
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py,
 line 277, in __call__
return Parent.__call__(self, x)
  File parent.pyx, line 1058, in sage.structure.parent.Parent.__call__ 
(sage/structure/parent.c:7886)
  File coerce_maps.pyx, line 82, in 
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ 
(sage/structure/coerce_maps.c:3344)
  File coerce_maps.pyx, line 77, in 
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ 
(sage/structure/coerce_maps.c:3247)
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py,
 line 305, in _element_constructor_
return x._complex_mpfr_field_( self )
  File expression.pyx, line 933, in 
sage.symbolic.expression.Expression._complex_mpfr_field_ 
(sage/symbolic/expression.cpp:5556)
  File expression.pyx, line 792, in 
sage.symbolic.expression.Expression._eval_self 
(sage/symbolic/expression.cpp:4969)
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/functions/special.py,
 line 510, in _evalf_
return parent(maxima(%s, numer%self._maxima_init_evaled_(*args)))
  File lazy_import.pyx, line 199, in 
sage.misc.lazy_import.LazyImport.__call__ (sage/misc/lazy_import.c:1509)
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/interfaces/interface.py,
 line 198, in __call__
return cls(self, x, name=name)
  File 
/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/interfaces/interface.py,
 line 625, in __init__
raise TypeError, x
TypeError: ECL says: Memory limit reached. Please jump to an outer pointer, 
quit program and enlarge the memory limits before executing the program again.

Justin

--
Justin C. Walker, Curmudgeon-at-Large
() The ASCII Ribbon Campaign
/\ Help Cure HTML Email



-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: How do you stop sage in the middle of a block?

2012-11-20 Thread Simon King
Hi!

On 2012-11-20, LFS lfahlb...@gmail.com wrote:
 --=_Part_363_10202299.1353441032364
 Content-Type: text/plain; charset=ISO-8859-1

 Thank-you both! 
 The 'break' did what I wanted for now and will test os._exit() in a bit.
 Really appreciate your help.

PS: Sage's user language is Python (plus some preprocessor that makes
some notations a bit closer to what mathematicians would expect). So,
you would probably find an answer to your question not in the Sage
documentation, but in the Python documentation.

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] How do you stop sage in the middle of a block?

2012-11-20 Thread Anton Sherwood

On 2012-11-20 10:48, LFS wrote:

How do you get sage out of a loop early?
How do you get sage to totally stop in the middle of a block?


Two ways have been mentioned; yet another is a custom Exception:

class IWantOut(Exception):
pass

try:
loop ...
...
raise IWantOut
...
except IWantOut:
respond to that condition

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Don't know a PDF representation for alpha in graphics?

2012-11-20 Thread john_perry_usm
Okay, does anyone know how I change files in the library in such a way that 
mercurial actually notices?

I can modify the matplotlib backend for PDF's so that this works, but those 
files don't show up in the source directory, so hg doesn't pick up on the 
changes. How do I supply a patch for this circumstance?

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Don't know a PDF representation for alpha in graphics?

2012-11-20 Thread Dima Pasechnik
On 2012-11-20, john_perry_usm john.pe...@usm.edu wrote:
 --=_Part_212_31060160.1353448773382
 Content-Type: text/plain; charset=ISO-8859-1

 Okay, does anyone know how I change files in the library in such a way that 
 mercurial actually notices?

 I can modify the matplotlib backend for PDF's so that this works, but those 
 files don't show up in the source directory, so hg doesn't pick up on the 
 changes. How do I supply a patch for this circumstance?
add a patch to the matplotlib spkg, and create a new version of it.

HTH,
Dmitrii 


-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Don't know a PDF representation for alpha in graphics?

2012-11-20 Thread Jason Grout

On 11/20/12 8:59 PM, Dima Pasechnik wrote:

On 2012-11-20, john_perry_usm john.pe...@usm.edu wrote:

--=_Part_212_31060160.1353448773382
Content-Type: text/plain; charset=ISO-8859-1

Okay, does anyone know how I change files in the library in such a way that
mercurial actually notices?

I can modify the matplotlib backend for PDF's so that this works, but those
files don't show up in the source directory, so hg doesn't pick up on the
changes. How do I supply a patch for this circumstance?

add a patch to the matplotlib spkg, and create a new version of it.


Or even better, in my opinion, post the patch to the matplotlib mailing 
list, or make the change in the matplotlib github source and submit a 
pull request to them.


Or post the patch here and I can forward it to the matplotlib mailing list.

Jason



--
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] output from sage to file

2012-11-20 Thread Александр Шевченко
I have encountered problem using Sage 5.4.
I want output information in file from console. On usually solve of this 
problem Sage write. My OS is Ubuntu.

sage: asd.sage  output.txt
---
NameError Traceback (most recent call last)

/home/toivo/sage/ipython console in module()

NameError: name 'asd' is not defined

sage: asd.sage | tee output.txt

   File ipython console, line 1
 asd.sage | tee output.txt
 ^
SyntaxError: invalid syntax

I can't directly run file from console. I must use function load.

I hope this information proves useful in correcting the problem.

Best regards,

Aleksandr

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: output from sage to file

2012-11-20 Thread P Purkayastha
The sage prompt is *not* a bash (or shell) prompt! It is an ipython 
prompt. If you want the output dumped to a file, then you need to run 
the asd.sage file like this:


$ sage asd.sage  output.txt

On 11/21/2012 12:57 PM, Александр Шевченко wrote:

I have encountered problem using Sage 5.4.
I want output information in file from console. On usually solve of this
problem Sage write. My OS is Ubuntu.

sage: asd.sage  output.txt
---
NameError Traceback (most recent call last)

/home/toivo/sage/ipython console in module()

NameError: name 'asd' is not defined

sage: asd.sage | tee output.txt

File ipython console, line 1
asd.sage | tee output.txt
^
SyntaxError: invalid syntax

I can't directly run file from console. I must use function load.

I hope this information proves useful in correcting the problem.

Best regards,

Aleksandr


--
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: output from sage to file

2012-11-20 Thread Александр Шевченко
I understood. Then next question.
I build sage from source.
In terminal.

$ sage
No command 'sage' found, did you mean:
 Command 'osage' from package 'graphviz' (main)
 Command 'save' from package 'atfs' (universe)
 Command 'page' from package 'tcllib' (universe)
sage: command not found

Best regards,

Aleksandr

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Re: output from sage to file

2012-11-20 Thread Jan Groenewald
Hi

Your sage installation seems to be in /home/toivo/sage/.
This is normally called SAGE_ROOT, which is a bash variable.
You can set the command sage to be an alias for /home/toivo/sage/sage
like this

alias sage='/home/toivo/sage/sage'

and you can make this permanent for all new terminals you open by
adding that line to your /home/toivo/.bashrc file, the configuration file
for bash.

Regards,
Jan



On 21 November 2012 08:30, Александр Шевченко 
shevchenko.alexander.1...@gmail.com wrote:

 I understood. Then next question.
 I build sage from source.
 In terminal.

 $ sage
 No command 'sage' found, did you mean:
  Command 'osage' from package 'graphviz' (main)
  Command 'save' from package 'atfs' (universe)
  Command 'page' from package 'tcllib' (universe)
 sage: command not found


 Best regards,

 Aleksandr

 --
 You received this message because you are subscribed to the Google Groups
 sage-support group.
 To post to this group, send email to sage-support@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-support+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-support?hl=en.






-- 
  .~.
  /V\ Jan Groenewald
 /( )\www.aims.ac.za
 ^^-^^

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.