configpy 0.5

Configuration file reading in Python made easy
configpy is a Python tool that makes reading configuration files very easy. With support for look-ahead and look-behind variable interpolation, native types such as int, float, dict and list configpy should satisfy your configuration file parsing needs.

Example:

from configpy import Config

cfg = """
nums = [1,2,3,4]
nando = "Nando"
names = ["Stevie", "${nando}", "Robbie"]
planets = { 'planet': '${red_planet}' }
red_planet = 'mars'
num_items = 5
item_cost = 1.99
"""

config = Config(cfg)
print sum(config.nums) # prints 10
print config.planets['planet'] # prints "mars"
config.names.sort()
print config.names # prints ["Nando", "Robbie", "Stevie"]
print config.num_items * config.item_cost # prints 9.95

last updated on:
June 2nd, 2010, 13:17 GMT
price:
FREE!
homepage:
keyes.ie
license type:
The Apache License 2.0 
developed by:
John Keyes
category:
ROOT \ Utilities
configpy
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT