gawel wrote:

[EMAIL PROTECTED] wrote:

but when I have Mylist in a file and I read it from the file it does
not work as I expect.


That's quite simple. Your file contain a string, not a list
You must use eval(your_list_as_string).


...except that eval() is a huge security hole. A better bet would be to use either the listquote module mentioned elsewhere, or to find an alternative way of storing your data that *doesn't* require using eval() to read it back in from disk. One possibility would be the ConfigParser module, which makes it easy to store (and retrieve) information from .ini-style files and/or the Windows Registry.

Jeff Shannon
Technician/Programmer
Credit International

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to