Take a look at ConfigParser module.  The format of the file would be
something like:

[members]
peter=16
anton=21

People are accustomed to this format file (windows .ini format).

-Larry


Ilias Lazaridis wrote:
> within a python script, I like to create a collection which I fill with
> values from an external text-file (user editable).
> 
> How is this accomplished the easiest way (if possible without the need
> of libraries which are not part of the standard distribution)?
> 
> something like:
> 
> text-file:
> {peter, 16},
> {anton, 21}
> 
> -
> 
> within code:
> 
> users.load(text-file.txt)
> 
> for user in users
>   user.name
>   user.age
> 
> .
> 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to