Monthly Archives: March 2011

Retrieving multiple values using ConfigParser in Python

python

I needed a way to retrieve multiple values within Python from a configuration file and came up with a way to do it using ConfigParser and a bit of magic (otherwise known as split()) First off, lets take a look at our config file, .config-sample: mb-pr0:x jgilmour$ cat .config-sample [HOSTINFO] HOSTS = host1.local, host2.local, host65.local, host66.local DNS = 192.168.2.1, 192.168.2.5, ... Read More »

Scroll To Top
Descargar musica