[sage-support] Re: Source browser

2009-05-09 Thread Kevin Horton
On 9 May 2009, at 12:04, William Stein wrote: > If you want a more sophisticated source browser, type this > > > sage: hg_sage.browse() > > This will start a separate server with a Mercurial HG repo browser. It would be nice to have a more useful error message if a browser is not found. I'm

[sage-support] Re: Convert a string (python) into a function (sage)

2009-05-09 Thread Robert Bradshaw
On May 9, 2009, at 4:12 AM, Laurent Claessens wrote: > > I half-answer to myself : > > >> 1. be able to convert a string into a function on which I can use >> Sage > > s = "x**3" > var('x') > f = eval(s) > print f(3) Or sage: SR(s) x^3 sage: SR("2a+5x^2-sqrt(pi)") 5*x^2 + 2*a - sqrt(pi) so y

[sage-support] Re: Source browser

2009-05-09 Thread Kwankyu
On May 10, 1:04 am, William Stein wrote: > On Sat, May 9, 2009 at 9:00 AM, Kwankyu wrote: > > > Hi, > > > I see some problems with this source browser. > > > 1. there are no line numbers for a source file. > > > 2. it is difficult to navigate through hierarchy as there is no "go up > > to the

[sage-support] Re: Source browser

2009-05-09 Thread William Stein
On Sat, May 9, 2009 at 9:00 AM, Kwankyu wrote: > > Hi, > > I see some problems with this source browser. > > 1. there are no line numbers for a source file. > > 2. it is difficult to navigate through hierarchy as there is no "go up > to the parent directory" link or ".." > > 3. files are not sort

[sage-support] Re: Source browser

2009-05-09 Thread Kwankyu
Hi, I see some problems with this source browser. 1. there are no line numbers for a source file. 2. it is difficult to navigate through hierarchy as there is no "go up to the parent directory" link or ".." 3. files are not sorted on the alphabetic order. I don't know in what order the files a

[sage-support] Re: Source browser

2009-05-09 Thread Kwankyu
This is all I need. Thank you! Kwankyu --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://g

[sage-support] Re: Source browser

2009-05-09 Thread William Stein
On Sat, May 9, 2009 at 1:20 AM, Kwankyu wrote: > > Hi, > > I am wondering how I could start the source browser in the notebook > (or possibly in sage command line) without searching anything. Thank > you for your reply in advance. In the notebook, you could manually navigate to the URL http:/

[sage-support] Re: Convert a string (python) into a function (sage)

2009-05-09 Thread Laurent
David Joyner a écrit : > Maybe this then? > > sage: from sympy import * > sage: Symbol("x") > x > sage: f = 3*x^2 > sage: str(f.as_basic()) > '3*x**2' > Yes !! :):) Thanks a lot. Laurent --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@g

[sage-support] Re: Convert a string (python) into a function (sage)

2009-05-09 Thread David Joyner
Maybe this then? sage: from sympy import * sage: Symbol("x") x sage: f = 3*x^2 sage: str(f.as_basic()) '3*x**2' On Sat, May 9, 2009 at 7:56 AM, Laurent wrote: > > >> >> sage: str(latex(g)) >> '{3 {x}^{2} }' >> >> what you want? >> > I would prefer 3*(x**2) > {3 {x}^{2} } > is not a valid pstr

[sage-support] FormalSum over finite field bug?

2009-05-09 Thread Christian Nassau
Hi, FormalSum arithemtic appears to be broken when the parent is a Galois field: sage: a = FormalSum([(1,'x')],parent=GF(7)) sage: 1*a 0 sage: a*1 --- TypeError Traceback (most recent call las

[sage-support] Re: Convert a string (python) into a function (sage)

2009-05-09 Thread Laurent
> > sage: str(latex(g)) > '{3 {x}^{2} }' > > what you want? > I would prefer 3*(x**2) {3 {x}^{2} } is not a valid pstricks's syntax, and I don't see how to manipulate it in order to get something valid. Maybe I can make the replacement { -> ( and } ->), but I fear some side effect of the LaT

[sage-support] Re: How to work properly with sage

2009-05-09 Thread Iwan Lappo-Danilewski
> .Well, not quite actually. The manual says define a SAGE_ROOT, but that's  > not enough also. > I foundhttp://wiki.sagemath.org/Sage_in_systemwide_python, but that example > also gives an error. When I added an environment variable SAGE_DOC (the error > was complaining about not finding it) i

[sage-support] Re: Convert a string (python) into a function (sage)

2009-05-09 Thread David Joyner
On Sat, May 9, 2009 at 7:12 AM, Laurent Claessens wrote: > > I half-answer to myself : > > >> 1. be able to convert a string into a function on which I can use Sage > > s = "x**3" > var('x') > f = eval(s) > print f(3) > > makes the job > >> 2. from the results of Sage (especially from diff(f,x)),

[sage-support] Re: Convert a string (python) into a function (sage)

2009-05-09 Thread Laurent Claessens
I half-answer to myself : > 1. be able to convert a string into a function on which I can use Sage s = "x**3" var('x') f = eval(s) print f(3) makes the job > 2. from the results of Sage (especially from diff(f,x)), I need a > string that I can manipulate with Python (especially use the .repla

[sage-support] Convert a string (python) into a function (sage)

2009-05-09 Thread Laurent Claessens
Hello everybody I wrote the following : ++ #! /usr/bin/sage -python # -*- coding: utf8 -*- from sage.all import * s = "x**2" var('x') f = sage_eval(s) print f(2) ++ I would have expected the result to print 4. Since I'm using Sage from yes

[sage-support] Source browser

2009-05-09 Thread Kwankyu
Hi, I am wondering how I could start the source browser in the notebook (or possibly in sage command line) without searching anything. Thank you for your reply in advance. Kwankyu --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroup