Home | Trees | Index | Help |
---|
Package svnmailer :: Package settings :: Module _fileparser :: Class FileParser |
|
object
--+
|
FileParser
Simplified config file parser
The ConfigParser module does too much magic (partially not even documented). Further we don't need all the set and save stuff here, so we write our own - clean - variant. This variant just reads the stuff and does not apply any typing or transformation. It also uses a better design...
Method Summary | |
---|---|
Initialization | |
bool |
Decides if section is a parsed section name |
Removes the section specified by name | |
Section |
Returns the section specified by name |
iter |
Returns a section iterator |
Option |
Returns a new Option instance |
Section |
Returns a new Section instance |
bool |
Decides if line is comment |
tuple |
Parses line as option (name [:=] value) |
str |
Tries to extract a section header from line |
Reads from fp until EOF and parses line by line | |
Inherited from object | |
x.__delattr__('name') <==> del x.name... | |
x.__getattribute__('name') <==> x.name... | |
x.__hash__() <==> hash(x)... | |
helper for pickle... | |
helper for pickle... | |
x.__repr__() <==> repr(x)... | |
x.__setattr__('name', value) <==> x.name = value... | |
x.__str__() <==> str(x)... | |
Inherited from type | |
T.__new__(S, ...) -> a new object with type S, a subtype of T... |
Instance Variable Summary | |
---|---|
dict | _sections : The parsed sections |
Method Details |
---|
__init__(self)
Initialization |
__contains__(self,
section)
Decides if |
__delitem__(self,
name)
Removes the section specified by |
__getitem__(self,
name)
Returns the section specified by |
__iter__(self)Returns a section iterator
|
_createOption(self, name, value)Returns a newOption instance
|
_createSection(self, name=None)Returns a newSection instance
|
_isComment(self, line)Decides ifline is comment
|
_parseOption(self, line)Parsesline as option (name [:=] value)
|
_trySectionHeader(self, line)Tries to extract a section header fromline
|
slurp(self, fp, filename)Reads fromfp until EOF and parses line by line
|
Instance Variable Details |
---|
_sectionsThe parsed sections
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Sun Sep 25 20:49:14 2005 | http://epydoc.sf.net |