Re: Converting a string to list for submission to easygui multenterb​ox

Chris Angelico rosuav at gmail.com
Thu May 3 00:29:46 EDT 2012


On Thu, May 3, 2012 at 3:57 AM, Laurent Pointal <laurent.pointal at free.fr> wrote:
> If you have it as a string, you can use eval() (not safe!) on the string to
> retrieve the tuple, then list() on the tuple to get a list.

Are you saying that eval is not safe (which it isn't), or that it has
to be eval() and not safe_eval() to do this job? There's also
ast.literal_eval which ought to be safe for this situation (I think).

ChrisA



More information about the Python-list mailing list