Help needed on config files
rw at smsnet.pl
Wed Jan 31 13:59:46 CET 2007
> Hi there,
> I am quite new on python programming and need some help on solving my
> I have to make a (python) program which deletes files from
> directories. I don't think deleting, etc. is the problem. The problem
> is that the directories where i have to delete them are 'dynamic'/
> subject to change. So what i thought is to make a config file
> containing an identifier (useful for myself) and there the directory.
> something like:
What about this?
from ConfigParser import ConfigParser
cfg = ConfigParser()
for proj in cfg.sections():
path = cfg.items(proj)
print "proj: %s, path: %s" % (proj, path)
Is that not enough?
More information about the Python-list