Re: Escape character problem

Jean-Baptiste Quenot <[email protected]> Mon, 21 Feb 2011 17:46:23 +0100
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
This is a very creative way of using Cheetah, congratulations!

No, seriously, I would use Python's built-in dictionary-style string
formatting for this:

>>> "%(COMM_BUS)s\\Pass through\\%(eDME)s_max.pkg" % {'COMM_BUS': 'A_CAN', 'eDME': '123'}
'A_CAN\\Pass through\\123_max.pkg'
-- 
Jean-Baptiste Quenot

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb