Writing and reading variables to/from flat file

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Fri Dec 15 06:15:35 EST 2006


Geoffrey Clements:
> readfile = open('prefs').readlines()
> for line in readfile:
>  print line
>  eval(line)
>  print Basic

Instead of using eval, using a plain dict may be a better solution.

Bye,
bearophile




More information about the Python-list mailing list