Here is the function ------------------------------- def BasicStats1a(exp1): v = exp1 v1 = eval(v);Count_=len(v1) sort_v1=sorted(v1) M1 =stats.mode(v1); v3=eval(str(M1[0])); v4=eval(str(M1[1])) R1 = stats.mean(v1);R2 = stats.median(v1) R3 = stats.std(v1) var_=R3**2 return R1,R2,R3,Count_,sort_v1,var_,v3,v4 ------------------------------------------------------------ You can see the eval's. Is there a security problem with sage_eval? The string comes from a form.
On Sep 8, 11:29 am, Harald Schilly <harald.schi...@gmail.com> wrote: > Can you please elaborate, what kind of list it is? Post an example, > tell us what web form it is (if necessary) and what do you want to do > with it? Besides eval, there is also sage_eval. > > H > > On Sep 8, 7:01 pm, Mikie <thephantom6...@hotmail.com> wrote: > > > > > I am taking a string that is a list. It is coming from a html form. > > Is there anyway other than eval to get the value from the list? When > > I take a single value from the form I use SR and it works, but no luck > > with the list. > > Thanx- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---