|
From: Stef M. <S.M...@ru...> - 2007-09-26 14:37:39
|
hello,
Coming from windows/Delphi,
I've been using Python for half a year now.
For reading/writing windows ini-files,
I used ConfigParser (already much more difficult than Delphi ;-)
Now I needed an windows ini-file (not a registry file),
where the case of the keys was preserved
(ConfigParser makes all keys lowercase).
So someone advised me to use ConfigObj,
which should be superior to ConfigParser.
So I try to read the manual,
looks very nice and well written.
But when I read the introduction,
"*ConfigObj* is a simple but powerful config file reader and writer"
I miss the "simplicty".
Apparently this simplicity yields for a certain group of programmers,
probably coming from Linux / C,
certainly not for windows/Delphi programmers.
Now my problem is very-very simple,
but I don't get it done,
so maybe someone get give me a few simple ;-) hints.
I open an ini-file for reading:
ini = ConfigObj ( filename )
I want to see what sections are ther:
ini.sections
Now I want to see what keys are in 1 specific sections:
??????
things like
ini.values()
ini.items()
give me all kind of key-value pairs, but without knowing in which
section they are stored ??
thanks,
Stef Mientki
Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629.
The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629.
|