commit | a240270b52930bbbd40bfb7316926e347d6ed642 | [log] [tgz] |
---|---|---|
author | Uiri <uiri00@gmail.com> | Mon Oct 21 19:58:48 2013 |
committer | Uiri <uiri00@gmail.com> | Mon Oct 21 19:58:48 2013 |
tree | f8ae89f75e3a745d5a277bb9f348efdfd3f66468 | |
parent | 0bf3170e82586bbeeb099de1e163d7fb09955e64 [diff] |
Bugfix release. Version 0.8.1
Original repository: https://github.com/uiri/toml
See also https://github.com/mojombo/toml
Python module which parses and emits TOML.
Released under the MIT license.
Passes https://github.com/BurntSushi/toml-test
See http://j.xqz.ca/toml-status for up to date test results.
https://github.com/mojombo/toml/blob/v0.2.0/README.md
pip install toml
toml.loads --- takes a string to be parsed as toml and returns the corresponding dictionary
toml.dumps --- takes a dictionary and returns a string which is the contents of the corresponding toml file.
There are other functions which I use to dump and load various fragments of toml but dumps and loads will cover most usage.
Example usage:
import toml with open("conf.toml") as conffile: config = toml.loads(conffile.read()) # do stuff with config here . . .