[sympy] Re: converting exponentiation to use pow in tostr

2008-09-29 Thread Ondrej Certik
On Mon, Sep 29, 2008 at 11:40 PM, Andy R. Terrel <[EMAIL PROTECTED]> wrote: > > Hmm updated my ancient code and got this to work: > > class CppPrinter(printing.str.StrPrinter): >def _print_Pow(self, expr): >PREC = printing.precedence.precedence(expr) >if expr.exp is S.NegativeO

[sympy] Re: converting exponentiation to use pow in tostr

2008-09-29 Thread Andy R. Terrel
Hmm updated my ancient code and got this to work: class CppPrinter(printing.str.StrPrinter): def _print_Pow(self, expr): PREC = printing.precedence.precedence(expr) if expr.exp is S.NegativeOne: return '1/%s'%(self.parenthesize(expr.base, PREC)) else:

[sympy] converting exponentiation to use pow in tostr

2008-09-29 Thread Andy R. Terrel
Hello, I was trying to get sympy to write out some test problems for my code in c++. The only problem I have is the exponentiation operator **. I can change my core.power.Pow.tostr to use pow(%s,%s) instead of %s** %s , but this isn't usable by others. I also wrote a routine to walk the args t

[sympy] Re: mathematica's manipulate

2008-09-29 Thread Ondrej Certik
2008/9/29 tetaberta <[EMAIL PROTECTED]>: > > > > On 29 Zář, 17:22, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I remember that at Sage Days 8, Eric wrote a simple script for >> Mathematica like manipulate command using traits. Is it available >> somewhere please? It was just couple line

[sympy] Re: mathematica's manipulate

2008-09-29 Thread tetaberta
On 29 Zář, 17:22, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: > Hi, > > I remember that at Sage Days 8, Eric wrote a simple script for > Mathematica like manipulate command using traits. Is it available > somewhere please? It was just couple lines, but the right lines. :) > > I'd like to do thing

[sympy] Re: mathematica's manipulate

2008-09-29 Thread Ondrej Certik
On Mon, Sep 29, 2008 at 6:00 PM, Vinzent Steinberg <[EMAIL PROTECTED]> wrote: > > Can you do such things with matplotlib? Otherwise you will need a > framework like Qt, gtk, wxWidgets, Tkinter... Yes, but you just do apt-get install python-enthought-traits-ui then you write couple lines of pyth

[sympy] Re: mathematica's manipulate

2008-09-29 Thread Vinzent Steinberg
Can you do such things with matplotlib? Otherwise you will need a framework like Qt, gtk, wxWidgets, Tkinter... I think similar things could be done with step: http://edu.kde.org/step/ Vinzent On 29 Sep., 17:22, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: > Hi, > > I remember that at Sage Days 8

[sympy] mathematica's manipulate

2008-09-29 Thread Ondrej Certik
Hi, I remember that at Sage Days 8, Eric wrote a simple script for Mathematica like manipulate command using traits. Is it available somewhere please? It was just couple lines, but the right lines. :) I'd like to do things like this: http://demonstrations.wolfram.com/ScatteringByASquareWellPote