Hi Antonio, On 11/03/15 17:34, Antonio Garcia-Uceda wrote: > - When runninf the .ini file attached, an error pops-up with the > following: "ValueError: Invalid characters in expression". What is wrong > with it?
Underscores are not supported as variable names inside the .ini file. When these are used inside of the initial condition expressions they give rise to the invalid characters in expression error. For those that are interested: we disallow underscores as it greatly simplifies the logic required to ensure that initial condition expressions are valid. If we did allow underscores then more work would be required to ensure that the expression does not contain something naughty in an attempt to execute arbitrary code: <http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html> Disallowing underscores and other 'fun' characters permits us to safely use eval(). This is an order of magnitude simpler than pulling in a proper expression evaluation library (or, worse still, rolling our own with a custom parser/syntax tree). Regards, Freddie. -- You received this message because you are subscribed to the Google Groups "PyFR Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. Visit this group at http://groups.google.com/group/pyfrmailinglist. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
