Referencing section name by interpolation in ConfigParser

Hans-Peter Jansen hpj at urpla.net
Tue Jan 24 18:23:06 EST 2017


Hi,
I would like to use a interpolated section name, e.g.:
[Section]
secref: %{section}s/whatever
should result in:
>>> config['Section']['secref']
'Section/whatever'
Any idea anybody, how to archive this with minimum fuzz?
Thanks,
Pete


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /