DTD Parsing

Ian ian.g.kelly at gmail.com
Wed Nov 10 15:38:49 EST 2010


On Nov 10, 1:05 am, r0g <aioe.... at technicalbloke.com> wrote:
> > That's five whole lines of code. Why go to all that trouble when you can
> > just do this:
>
> > import config
>
> Heh, mainly because I figure the config module will have a lot more
> options than I have use for right now and therefore the docs will take
> me longer to read than I will save by not just typing in the above ;)

I think you misunderstand me.  There is no config module and there are
no docs to read.  It's just the configuration file itself written as a
Python script, containing arbitrary settings like:

SESSION_TIMEOUT = 900

or:

DOMAIN_OBJECTS = [
    ObjectType1(
        option1 = 'foo',
        option2 = 'bar',
    ),
    ObjectType2(
        option1 = 'foo',
        option2 = 'baz',
        option3 = 42,
    ),
    ...
]

Cheers,
Ian



More information about the Python-list mailing list