No description, website, or topics provided.
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
meta.py
model.py
rule.conf
test.py

README.md

A wrapper for Python's config parser

You can create a config file:

[basis]
user = sunhf
time = 2012-12-31
memo =

[BowtIE]
# case insensitive for section name

path = /usr/bin/bowtie
Index = /mnt/Storage/sync/hg19

And then use it like this:

from meta import Section, Base
class Conf(Base):
    basis = Section(["user", "time"])
    bowtie = Section(["path", "index"])

cf = Conf("rule.conf")

print cf.basis
print cf.basis.user
print cf.basis.time

print cf.bowtie
print cf.bowtie.path
print cf.bowtie.index