Eval(string) in client

The following error occurs when running eval(string) in the client so that the function has to run in the server.

By any chance the function can be run in the client since I really want to implement fat-client
Thanks

NotImplementedError: eval is not yet implemented

I don’t think this will work any time soon on the client. The implementation of Python running on Javascript lacks some important features that prevent it from implementing some functions like eval.

A workaround I have used in simple cases when I wanted to allow to enter an arithmetic expression on a text box, was to create a simple Javascript function and do the eval in Javascript.

Thanks, It seems that I need to write a similar function by myself

Potentially, eval() can do some very nasty things, depending on the string it is given. You’ll probably want to guard its inputs very carefully.

Thansk for the tip, I use it to convert a string to a list of dics, so far no issue but I haven’t test really carefully