> I would like to parse arbitrary insecure text string containing nested > Python data structures in eval-compatible form: Python 2.6 has ast.literal_eval to do exactly this. It handle lists, tuples, dict, numbers, strings, bool and None, with arbitrary nesting. Cheers, Franck