All pastes #839289 Raw Edit

Mine

public text v1 · immutable
#839289 ·published 2007-12-30 23:15 UTC
rendered paste body
user@host:~> easy_install amara
....
user@host:~> te test.xml
~n
<?xml version="1.0"?>
<test>
 <blah>123</blah>
 <foo>yes</foo>
</test>
~s
~q
user@host:~> te test.py
~n
~p
from amara import binderytools as bt

def LoadXML(config):
    tmp = bt.bind_file(config)
    conf = os.path.basename(config)
    self.__dict__[conf] = getattr(tmp, conf)

print "conf.test.blah: " + conf.test.blah
print "conf.test.foo: " + conf.test.foo
~s
~q