def mock_literal(s):
 if isinstance(s, unicode):
  u = unicode(s)
 else:
  u = unicode(s, encoding='ascii')
 return u.upper()

def mock_literal ( s ) : if isinstance ( s , unicode ) : u = unicode ( s ) else : u = unicode ( s , encoding = 'ascii' ) return u . upper ( )
for use as the literal keyword argument to the renderengine constructor .