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

Re: [Cheetahtemplate-discuss] Escape character problem

Expand Messages
  • Jean-Baptiste Quenot
    This is a very creative way of using Cheetah, congratulations! No, seriously, I would use Python s built-in dictionary-style string ... A_CAN Pass
    Message 1 of 4 , Feb 21, 2011
    • 0 Attachment
      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
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • 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 2 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.