[EMAIL PROTECTED] writes:

> I've to use ConfigParser.
>
> It returns values that are exactly in the config file, so get string
> variables like:
> int1 with quotes and characers: "42"
> this is easy to convert to int:
> realint = int(int1)

There's already a method getint() for that, you can just say

cfgparser.getint('section', 'int1')

> if there is list1 = "[ 'filea', 'fileb', ]", I can get at list by
> doing:
> reallist = eval(list1)

Are you sure you need to use ConfigParser for that? If you need to have
persistent Python data structures, I'd suggest marshalling data and using
(c)Pickle or similar.

-- 
# Edvard Majakari               Software Engineer
# PGP PUBLIC KEY available      Soli Deo Gloria!

"Debugging is twice as hard as writing the code in the firstplace. Therefore,
 if you write the code as cleverly as possible, you are, by definition,
 not smart enough to debug it."  -- Brian W. Kernighan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to