Method summary
Methods
- __call__(self, match)
Handler invoked for each regex match
- xlat(self, text)
Translate text, returns the modified text.
API Reference for Enthought Tool Suite 3.0.1
All-in-one multiple-string-substitution class
Example usage:
text = "Larry Wall is the creator of Perl" adict = { "Larry Wall" : "Guido van Rossum", "creator" : "Benevolent Dictator for Life", "Perl" : "Python", }
print multiple_replace(adict, text)
xlat = Xlator(adict) print xlat.xlat(text)
Handler invoked for each regex match
Translate text, returns the modified text.
© Copyright 2002-2008 Enthought, Inc.