Loading ...
Sorry, an error occurred while loading the content.

Re: [Cheetahtemplate-discuss] Escape character problem

Expand Messages
  • Saranakom Cheecharoen
    Thanks, Jean-Baptiste Quenot. I have many things to learn more in Python. Regards, Long ... From: caraldi@gmail.com [mailto:caraldi@gmail.com] On Behalf Of
    Message 1 of 4 , Feb 21, 2011
    • 0 Attachment
      Thanks, Jean-Baptiste Quenot.

      I have many things to learn more in Python.

      Regards,
      Long

      -----Original Message-----
      From: caraldi@... [mailto:caraldi@...] On Behalf Of
      Jean-Baptiste Quenot
      Sent: Monday, February 21, 2011 11:46 PM
      To: Saranakom Cheecharoen
      Cc: cheetahtemplate-discuss@...
      Subject: Re: [Cheetahtemplate-discuss] Escape character problem

      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


      ------------------------------------------------------------------------------
      Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
      Collect, index and harness all the fast moving IT data generated by your
      applications, servers and devices whether physical, virtual or in the cloud.
      Deliver compliance at lower cost and gain new business insights.
      Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    Your message has been successfully submitted and would be delivered to recipients shortly.