No description, website, or topics provided.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

A wrapper for Python's config parser

You can create a config file:

user = sunhf
time = 2012-12-31
memo =

# 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