AppleDash / stalker-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stalker-parser

My friend wanted to parse the data in files from the bastardized INI files that STALKER uses, or something.

It supports overriding of values using the [child]:parent syntax, and supports deferring resolution of these overrides until we actually have the file they exist in.

Example

import pprint
import stalker_parser

parser = stalker_parser.StalkerConfigParser()

with open('/some/file/path', 'r',) as fp:
    parser.parse(line.strip() for line in fp)

pprint.pprint(parser.sections)

About

License:MIT License


Languages

Language:Python 100.0%