INITools

Tools for parsing and using INI-style files
Download

INITools Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Ian Bicking
  • Publisher web site:
  • http://sqlobject.org/

INITools Tags


INITools Description

Tools for parsing and using INI-style files INITools is a Python module that provides a set of tools for parsing and using .ini-style files, including an abstract parser and several tools built on that parser.This is similar to ConfigParser, only easier to build on than that library.A whirlwind tour of the modules:iniparser:The most basic module, this is a simple parser for .ini-style files. You subclass the parser and build your objects as the file is parsed. See initools.iniparser.BasicParser for a minimal example.configparser: A module compatible with the standard library ConfigParser module -- it doesn't actually share any code with that module, but supports all the same thing plus some other (optional but disabled) features.configwrapper:This offers a simple Config object that takes a single filename as an argument, and provides a simple interface to that file. The closest thing here to ConfigParser, I guess.lazyiniparser:An ini parser that keeps complete track of the files it draws from, including order, filename/line number, and comments. It can be used for systems that support round-tripping (reading and writing files).inischema:A thought experiment, mostly. Supports a class-based schema definition, and reads files matching them against the definition. Not terribly advanced. It would be more interesting if it used FormEncode for schemas, or maybe something based on (or similar to) optparse. A config-file compliment to optparse would be generally useful, but probably would be based more on iniparser or lazyiniparser.nested:A nested dictionary-like object. Lets you fold several dictionaries into a single view, including nested dictionaries.lazyloader:The fanciest and most complicated of the modules. This is where it seemed to get out of control (especially combined as it is with nested). This supports loading several files, doing conversion with source tracking, parsing the keys and sections to create highly nested structures, and folding a configuration back onto itself (for context-sensitive configuration).This is complex enough that it becomes necessary to debug your configuration files, which sucks. Requirements: · Python


INITools Related Software