Using Python 2.6 or higher: Is there a way to configure
string.Template() to ignore the case of matched identifiers?
In other words, given the following Template string and
dictionary where all keys are lowercase, is there a way to have
my identifiers expanded based on their lowercase values?
import string
values = dict( name='John Doe', phone='999-555-1212' )
output = string.Template( 'My name is $NAME and my phone is
$Phone.' ).safe_substitute( values )
Thank you,
Malcolm
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to