recommended general-purpose string template packages?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Machin

    #1

    recommended general-purpose string template packages?

    Hi,

    In general, I'm mainly interested in a template engine for dynamic web
    pages but would like a general purpose one to avoid learning yet
    another package for generating e-mail messages, form letters, source
    code, whatever.

    In particular, does anyone have much experience with the Python
    interface to Terence Parr's StringTemplate
    (http://www.stringtemplate.org/)? Reading the website, I'm attracted by
    the approach, but a Google search (both generally and in this
    newsgroup) gives me the impression that it's little used in the Python
    world.

    TIA,
    John

  • Ravi Teja

    #2
    Re: recommended general-purpose string template packages?

    In general, I'm mainly interested in a template engine for dynamic web
    pages but would like a general purpose one to avoid learning yet
    another package for generating e-mail messages, form letters, source
    code, whatever.
    >
    In particular, does anyone have much experience with the Python
    interface to Terence Parr's StringTemplate
    (http://www.stringtemplate.org/)? Reading the website, I'm attracted by
    the approach, but a Google search (both generally and in this
    newsgroup) gives me the impression that it's little used in the Python
    world.
    Most Python templating engines are general purpose. Choice between them
    however is sometimes a matter of preference, like editors. I settled
    down on Cheetah for most part.

    Here is a list of some popular ones.


    Comment

    • metaperl

      #3
      Re: recommended general-purpose string template packages?


      John Machin wrote:
      Hi,
      >
      In general, I'm mainly interested in a template engine for dynamic web
      pages but would like a general purpose one to avoid learning yet
      another package for generating e-mail messages, form letters, source
      code, whatever.
      HTMLTemplate and texttemplate offer a somewhat uniform approach to text
      versus HTML... it attempts to raise string processing up to the level
      of tree/HTML processing. That stringtemplate module seems to be aiming
      for the lowest common denominator.

      Interesting contrast in approaches:


      Comment

      • Yu-Xi Lim

        #4
        Re: recommended general-purpose string template packages?

        Ravi Teja wrote:
        Most Python templating engines are general purpose. Choice between them
        however is sometimes a matter of preference, like editors. I settled
        down on Cheetah for most part.
        I second Cheetah. It's suitable for most text templates. Many others are
        specific for XML or HTML documents.

        Comment

        • Dan Sommers

          #5
          Re: recommended general-purpose string template packages?

          On 13 Aug 2006 19:48:55 -0700,
          "John Machin" <sjmachin@lexic on.netwrote:
          In general, I'm mainly interested in a template engine for dynamic web
          pages but would like a general purpose one to avoid learning yet
          another package for generating e-mail messages, form letters, source
          code, whatever.
          And don't forget Python's Template class:



          Regards,
          Dan

          --
          Dan Sommers
          <http://www.tombstoneze ro.net/dan/>
          "I wish people would die in alphabetical order." -- My wife, the genealogist

          Comment

          • vj

            #6
            Re: recommended general-purpose string template packages?

            I use preppy from reportlab:



            It's one file, is fast and can be easily embedded in any application.

            Vineet

            Comment

            • metaperl

              #7
              Re: recommended general-purpose string template packages?


              vj wrote:
              I use preppy from reportlab:
              >
              http://www.reportlab.org/preppy.html
              wow. thanks for the link. I second you on pretty. It is ultra-simple
              and nothing but a gateway to python.

              also, reportlab makes a number of high-quality open source python
              wares.

              Comment

              Working...