Package imagizer :: Module parser :: Class AttrFile
[hide private]
[frames] | no frames]

Class AttrFile

source code

Attributes file representation and trivial parser.

Instance Methods [hide private]
 
__init__(self, path)
Constructor.
source code
 
read(self)
Read the file and parse it.
source code
 
resetDirty(self)
Resets the dirty flag.
source code
 
write(self)
Write the file to disk, if dirty.
source code
 
parse(self, lines)
Parse attributes file lines into a map.
source code
 
get(self, field)
Returns an attribute field content extracted from this attributes file.
source code
 
get_def(self, field, default=None)
Returns an attribute field content extracted from this attributes file.
source code
 
set(self, field, value)
Sets a field of the description file.
source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
keys(self) source code
 
has_key(self, key) source code
 
__len__(self) source code
 
__repr__(self)
Returns contents to a string for debugging purposes.
source code
Method Details [hide private]

resetDirty(self)

source code 

Resets the dirty flag. Why would you want to do this?

set(self, field, value)

source code 

Sets a field of the description file. Returns true if the value has changed. Set a field value to None to remove the field.