creating "jsp-like" tool with python

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

    #1

    creating "jsp-like" tool with python

    I'd like to create a program that takes files with "jsp-like" markup
    and processes the embedded code (which would be python) to produce the
    output file. There would be two kinds of sections in the markup file:
    python code to be evaluated, and python code that returns a value that
    would be inserted into the output.

    This seems like it would be straightforward in python, and maybe
    there's even a library that I could use for this, but as a newbie to
    Python, I don't know the landscape very well. I am not looking for a
    big framework, just something small and simple that will do just this
    job. Suggestions or pointers would be greatly appreciated.

    Thanks...

    -- jeff

  • Kushal Kumaran

    #2
    Re: creating "jsp-like" tool with python

    On Mar 24, 6:18 am, "jd" <chima...@gmail .comwrote:
    I'd like to create a program that takes files with "jsp-like" markup
    and processes the embedded code (which would be python) to produce the
    output file. There would be two kinds of sections in the markup file:
    python code to be evaluated, and python code that returns a value that
    would be inserted into the output.
    >
    This seems like it would be straightforward in python, and maybe
    there's even a library that I could use for this, but as a newbie to
    Python, I don't know the landscape very well. I am not looking for a
    big framework, just something small and simple that will do just this
    job. Suggestions or pointers would be greatly appreciated.
    >
    Apache's mod_python already does something like this, with its PSP
    handler. See http://webpython.codepoint.net/mod_python

    Maybe that would help.

    --
    Kushal Kumaran

    Comment

    • irstas@gmail.com

      #3
      Re: creating &quot;jsp-like&quot; tool with python


      jd wrote:
      I'd like to create a program that takes files with "jsp-like" markup
      and processes the embedded code (which would be python) to produce the
      output file. There would be two kinds of sections in the markup file:
      python code to be evaluated, and python code that returns a value that
      would be inserted into the output.
      >
      This seems like it would be straightforward in python, and maybe
      there's even a library that I could use for this, but as a newbie to
      Python, I don't know the landscape very well. I am not looking for a
      big framework, just something small and simple that will do just this
      job. Suggestions or pointers would be greatly appreciated.
      >
      Thanks...
      >
      -- jeff
      Sadly, there's probably as many template languages as there are web
      frameworks for Python.
      Maybe even more. For example:





      Pick your poison.

      Comment

      • Bruno Desthuilliers

        #4
        Re: creating &quot;jsp-like&quot; tool with python

        jd a écrit :
        I'd like to create a program that takes files with "jsp-like" markup
        and processes the embedded code (which would be python) to produce the
        output file. There would be two kinds of sections in the markup file:
        python code to be evaluated, and python code that returns a value that
        would be inserted into the output.
        >
        This seems like it would be straightforward in python, and maybe
        there's even a library that I could use for this, but as a newbie to
        Python, I don't know the landscape very well. I am not looking for a
        big framework, just something small and simple that will do just this
        job. Suggestions or pointers would be greatly appreciated.
        There are already quite a few Python templating solutions. You may want
        to look for:
        - Python server pages
        - Mighty
        - Mako
        - Jinja
        - Genshi
        - Cheetah
        - Newov
        - Zope Page Templates
        - SimpleTAL (standalone implementation of ZPT)
        - (add your favorite Python templating system here)

        Comment

        Working...