web2py executes python code. If you can do it in the shell, you can do the same thing in web2py. Be careful to check the variable types, probably in your app something is a little different from your shell environment. BTW, why don't you just a = '348' a = int(a) / 100 ?
On Thursday, November 29, 2012 5:16:53 AM UTC+1, Relsi Hur wrote: > > Hello all! > > I need transform a string in a decimal number, I can to do it that way: > > >>> a = list("348") > >>> a.insert(-2, '.') > >>> "".join(a) > '3.48' > >>> > > But when try this in web2py I get a "None" value, in the a.insert() > operation. > > So, someone would know how to do this in web2py? This way or otherwise? > --