Package ProcImap :: Package Utils :: Module Processing :: Class ReplacementListFile
[hide private]
[frames] | no frames]

Class ReplacementListFile

source code

This class wraps around a file containing email address replacements. The text file contains lines such as noreply@couchsurfing.com :: Couchsurfing <noreply@couchsurfing.com> The intention is to to replace 'noreply@couchsurfing.com' with 'Couchsurfing <noreply@couchsurfing.com>'. You can use this to make the from-line look nice in your email reader, if people send you crippled from-lines.

Instance Methods [hide private]
 
__init__(self, filename, inmemory=False, regexes=False, partial=False) source code
 
lookup(self, searchstring)
Return a replacement.
source code
 
add(self, line)
Add line to self.filename
source code
Method Details [hide private]

lookup(self, searchstring)

source code 

Return a replacement. If no replacement is found, return the searchstring.