Hello,

>  import sage.all
>  s = sage.all.Sage()
>  print s.factor(100)
>
>  What if I wanted to pass "s" (the Sage object) a string such as
>  "diff(sin(x^2), x)" ???

If you don't mind working with with strings, then you can use s.eval
which takes in a string and returns a string as well.

sage: s.eval('diff(sin(x^2),x)')
'2*x*cos(x^2)'
sage: s.eval('a = 2')
''
sage: s.eval('a')
'2'

--Mike

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to