Properties is an implementation of java.util.Properties in Python. It may have some holes, but has been used in a couple projects with good results.
Requires Python 2.2 or greater because properties.Properties is a subclass of dict.
>>> from properties import Properties >>> props = Properties() >>> props['one'] = '1' >>> props['your name'] = "I don't know" >>> print '\n'.join(props.keys()) your name one >>> from StringIO import StringIO >>> buff = StringIO() >>> props.store(buff, "a little example...") >>> buff.seek(0) >>> print buff.read() # a little example... your\ name=I\ don\'t\ know one=1 >>> print props['your name'] I don't know
Python License
Please feel free to contact me with questions, comments, or suggestions at oliver@rutherfurd.net.