Re: calculating a string equation

2010-02-20 Thread Chris Rebert
On Sat, Feb 20, 2010 at 3:07 PM, Astan Chee wrote: > Arnaud Delobelle wrote: > Astan Chee writes: > Hi, > I have some variables in my script that looks like this: > vars = {'var_a':'10','var_b':'4'} > eqat = "(var_a/2.0) <= var_b" > result = "(var_a+var_b)/7" > What I'm trying to do is to plug in

Re: calculating a string equation

2010-02-20 Thread Astan Chee
Arnaud Delobelle wrote: Astan Chee writes: Hi, I have some variables in my script that looks like this: vars = {'var_a':'10','var_b':'4'} eqat = "(var_a/2.0) <= var_b" result = "(var_a+var_b)/7" What I'm trying to do is to plug in var_a and var_b's values from vars into eqat and see if eqat

Re: calculating a string equation

2010-02-11 Thread Arnaud Delobelle
Astan Chee writes: > Hi, > I have some variables in my script that looks like this: > vars = {'var_a':'10','var_b':'4'} > eqat = "(var_a/2.0) <= var_b" > result = "(var_a+var_b)/7" > What I'm trying to do is to plug in var_a and var_b's values from vars > into eqat and see if eqat returns true or

calculating a string equation

2010-02-11 Thread Astan Chee
Hi, I have some variables in my script that looks like this: vars = {'var_a':'10','var_b':'4'} eqat = "(var_a/2.0) <= var_b" result = "(var_a+var_b)/7" What I'm trying to do is to plug in var_a and var_b's values from vars into eqat and see if eqat returns true or false as well as getting the va