python web programming / CMS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • news.telenet.be

    python web programming / CMS

    Hi,

    i'm looking at python to do programming for the new intranet
    here at the company. I'm looking at plone/zope also.
    Before, I've used jsp for webprogramming but i'm considering
    python for this.
    One thing that isn't clear to me is if it's possible to include python
    code in a html page like you would do with jsp and then have zope
    "translate" that to html. With jsp, one could use an apache/tomcat
    combo to accomplish this.
    If one can't include python in html, is Zope the only alternative and
    how does code look like then?

    Thanks


  • Arcane

    #2
    Re: python web programming / CMS

    news.telenet.be wrote:
    [color=blue]
    >Hi,
    >
    >i'm looking at python to do programming for the new intranet
    >here at the company. I'm looking at plone/zope also.
    >Before, I've used jsp for webprogramming but i'm considering
    >python for this.
    >One thing that isn't clear to me is if it's possible to include python
    >code in a html page like you would do with jsp and then have zope
    >"translate" that to html. With jsp, one could use an apache/tomcat
    >combo to accomplish this.
    >If one can't include python in html, is Zope the only alternative and
    >how does code look like then?
    >
    >Thanks
    >
    >
    >
    >[/color]
    There are various ways to implement a "PSP (Python Server Pages)"-type
    setup.

    I don't know how well regarded it is amongst other python users - in
    fact, I'd be interested to know, but I use the
    very lightweight Spyce : http://spyce.sourceforge.net.

    I use Spyce-flavoured apache, in combination with python cgi stuff to
    great effect on our intranet.

    Hope this helps.





    Comment

    • flupke

      #3
      Re: python web programming / CMS

      "Arcane" <arcane@deepfor t.com> schreef in bericht
      news:mailman.91 0.1082637637.20 120.python-list@python.org ...[color=blue]
      > news.telenet.be wrote:
      >[color=green]
      > >Hi,
      > >
      > >i'm looking at python to do programming for the new intranet
      > >here at the company. I'm looking at plone/zope also.
      > >Before, I've used jsp for webprogramming but i'm considering
      > >python for this.
      > >One thing that isn't clear to me is if it's possible to include python
      > >code in a html page like you would do with jsp and then have zope
      > >"translate" that to html. With jsp, one could use an apache/tomcat
      > >combo to accomplish this.
      > >If one can't include python in html, is Zope the only alternative and
      > >how does code look like then?
      > >
      > >Thanks
      > >
      > >
      > >
      > >[/color]
      > There are various ways to implement a "PSP (Python Server Pages)"-type
      > setup.
      >
      > I don't know how well regarded it is amongst other python users - in
      > fact, I'd be interested to know, but I use the
      > very lightweight Spyce : http://spyce.sourceforge.net.
      >
      > I use Spyce-flavoured apache, in combination with python cgi stuff to
      > great effect on our intranet.
      >
      > Hope this helps.[/color]

      (saw name was misconfigured as news.telenet.be )

      This seems to be doing what i want. However i have some more
      questions :)

      1. Am i correct in thinking i would have to add for instance FastCGI to
      the Spyce install in order to get it working?

      2. In jsp, i often used my own java objects in the code. Can you also do
      this with Spyce? For instance, if i would have to get data from a db, i
      would
      make an object that implements code to do this and then create an instance
      of that object in a PSP. Is this doable?

      3. What databases can be accessed from Python?

      Flupke



      Comment

      • Doug Holton

        #4
        Re: python web programming / CMS

        news.telenet.be wrote:
        [color=blue]
        > Hi,
        >
        > i'm looking at python to do programming for the new intranet
        > here at the company. I'm looking at plone/zope also.
        > Before, I've used jsp for webprogramming but i'm considering
        > python for this.
        > One thing that isn't clear to me is if it's possible to include python
        > code in a html page like you would do with jsp and then have zope
        > "translate" that to html. With jsp, one could use an apache/tomcat
        > combo to accomplish this.
        > If one can't include python in html, is Zope the only alternative and
        > how does code look like then?
        >
        > Thanks
        >
        >[/color]
        Check out http://www.python.org/cgi-bin/moinmoin/WebProgramming
        for all the python options.
        I'd recommend checking out mod_python. You can embed Python in HTML
        using mod_python's PSP.

        Comment

        • Peter van Kampen

          #5
          Re: python web programming / CMS

          In article <EOOhc.82192$A9 .5538906@phobos .telenet-ops.be>, news.telenet.be wrote:[color=blue]
          > Hi,
          >
          > i'm looking at python to do programming for the new intranet
          > here at the company. I'm looking at plone/zope also.
          > Before, I've used jsp for webprogramming but i'm considering
          > python for this.
          > One thing that isn't clear to me is if it's possible to include python
          > code in a html page like you would do with jsp and then have zope
          > "translate" that to html. With jsp, one could use an apache/tomcat
          > combo to accomplish this.[/color]

          Look at PSP. See www.modpython.org for mor information.
          [color=blue]
          > If one can't include python in html, is Zope the only alternative and
          > how does code look like then?[/color]

          By no means. For more info start here: http://www.python.org/sigs/web-sig/

          Hth,

          PterK


          --
          Peter van Kampen
          pterk -- at -- datatailors.com

          Comment

          • asdf sdf

            #6
            Re: python web programming / CMS

            > 1. Am i correct in thinking i would have to add for instance FastCGI to[color=blue]
            > the Spyce install in order to get it working?
            >
            > 2. In jsp, i often used my own java objects in the code. Can you also do
            > this with Spyce? For instance, if i would have to get data from a db, i
            > would
            > make an object that implements code to do this and then create an instance
            > of that object in a PSP. Is this doable?
            >
            > 3. What databases can be accessed from Python?[/color]

            i've only played a bit with Spyce.

            you can use it as plain CGI, or you can use FastCGI or modpython. your
            choice.

            you can invoke python scripts which can make database connections.

            database support isn't built into Spyce. you get the python-wrapper for
            whatever database you want. a bunch are available. certainly all the
            major databases.

            modpython has recently greatly expanded its scope. now it includes PSP
            style functionality. also session support. seems to overlap pretty
            heavily/maybe subsume what Spyce does.

            i tried asking on the modpython group for a comparison of modpython PSP
            v. Spyce PSP, especially in terms on completeness, stability, scope, etc.

            i triggered an interesting discussion of PSP-style templates, but no one
            directly answered my question.

            Be advised also there are other python PSP-style projects out there,
            including one named PSP.

            Also I hope you realize none of these projects are a CMS framework of
            any sort. They are tools with which you could write your own.

            I assume your CMS requirements are very minimal or you would avoid
            trying to reinvent the wheel.


            Comment

            • flupke

              #7
              Re: python web programming / CMS

              asdf sdf wrote:[color=blue]
              >
              > i've only played a bit with Spyce.
              >
              > you can use it as plain CGI, or you can use FastCGI or modpython.
              > your choice.
              >
              > you can invoke python scripts which can make database connections.
              >
              > database support isn't built into Spyce. you get the python-wrapper
              > for whatever database you want. a bunch are available. certainly
              > all the major databases.
              >
              > modpython has recently greatly expanded its scope. now it includes
              > PSP style functionality. also session support. seems to overlap
              > pretty heavily/maybe subsume what Spyce does.
              >
              > i tried asking on the modpython group for a comparison of modpython
              > PSP v. Spyce PSP, especially in terms on completeness, stability,
              > scope, etc.
              >
              > i triggered an interesting discussion of PSP-style templates, but no
              > one directly answered my question.
              >
              > Be advised also there are other python PSP-style projects out there,
              > including one named PSP.
              >
              > Also I hope you realize none of these projects are a CMS framework of
              > any sort. They are tools with which you could write your own.
              >
              > I assume your CMS requirements are very minimal or you would avoid
              > trying to reinvent the wheel.[/color]

              Well, i'm assigned a project where i have to choose a intranet sollution
              and a platform for future webbased tools development.
              I'm trying to get a clear idea of what is possible.
              For the moment 2 kinds of setup are considered
              OpenCMS - JBoss - Apache - Tomcat
              or
              Plone - Zope - Apache - Spyce / modpython

              A have worked with jsp's before so i pretty much know what i could
              except from the first environment. But python triggered my interest
              because it's faster to develop code (and clean code) and Plone
              seems like one of the best opensource CMS around.

              I know that with OpenCMS, i could make html pages with jsp
              code inside. Is that also possible in Plone/Zope? I mean having plone
              process pages with embedded Python through modpython or Spyce?
              Or is plone going to send the pages to Zope? That's a part that's not
              yet clear for me.

              Also, can one use his own python objects in those PSP pages?

              flupke


              Comment

              • asdf sdf

                #8
                Re: python web programming / CMS

                > Well, i'm assigned a project where i have to choose a intranet sollution[color=blue]
                > and a platform for future webbased tools development.
                > I'm trying to get a clear idea of what is possible.
                > For the moment 2 kinds of setup are considered
                > OpenCMS - JBoss - Apache - Tomcat
                > or
                > Plone - Zope - Apache - Spyce / modpython
                >[/color]

                with modpython/spyce you can use your own python objects.

                There's been a lot of discussion of Plone and Zope. Check Slashdot.
                Both have a lot of rapid fans, but naysayers say they are too
                complicated and too slow. Some say you're buy end user ease-of-use at
                the cost of administrative complexity. you'll have to let me know what
                you find out.

                Comment

                • flupke

                  #9
                  Re: python web programming / CMS

                  asdf sdf wrote:[color=blue][color=green]
                  >> Well, i'm assigned a project where i have to choose a intranet
                  >> sollution and a platform for future webbased tools development.
                  >> I'm trying to get a clear idea of what is possible.
                  >> For the moment 2 kinds of setup are considered
                  >> OpenCMS - JBoss - Apache - Tomcat
                  >> or
                  >> Plone - Zope - Apache - Spyce / modpython
                  >>[/color]
                  >
                  > with modpython/spyce you can use your own python objects.
                  >
                  > There's been a lot of discussion of Plone and Zope. Check Slashdot.
                  > Both have a lot of rapid fans, but naysayers say they are too
                  > complicated and too slow. Some say you're buy end user ease-of-use at
                  > the cost of administrative complexity. you'll have to let me know
                  > what you find out.[/color]

                  Hehe :) Well i'm trying to figure out before i decide on what i'm
                  going to use. Are there other good CMS around based on Python?

                  Anyway, i saw a page ( forgot the link ) that had benchmarks
                  between python, java, c++ and perl and it seemed that Python
                  was indeed a lot slower than the other languages. But if you have
                  a fast server, it might not be so much of a problem.

                  flupke



                  Comment

                  • asdf sdf

                    #10
                    Re: python web programming / CMS

                    [color=blue]
                    > Hehe :) Well i'm trying to figure out before i decide on what i'm
                    > going to use. Are there other good CMS around based on Python?
                    >
                    > Anyway, i saw a page ( forgot the link ) that had benchmarks
                    > between python, java, c++ and perl and it seemed that Python
                    > was indeed a lot slower than the other languages. But if you have
                    > a fast server, it might not be so much of a problem.
                    >
                    > flupke
                    >
                    >
                    >[/color]
                    Check out the earlier thread 'Simple pyhon-based CMS' (sic) started on
                    4-13 by Stewart Midwinter in this group.

                    many threads in this group have clearly established that python is just
                    as fast as java, c, c++, perl, assembler and light, and that speed
                    doesn't matter anyways ;)

                    Comment

                    • Michael Hudson

                      #11
                      Re: python web programming / CMS

                      "flupke" <flupke@nonexis tingdomain.com> writes:
                      [color=blue]
                      > I know that with OpenCMS, i could make html pages with jsp
                      > code inside. Is that also possible in Plone/Zope? I mean having plone
                      > process pages with embedded Python through modpython or Spyce?[/color]

                      Er. I'm not sure that really makes sense.
                      [color=blue]
                      > Or is plone going to send the pages to Zope?[/color]

                      Or that :-)
                      [color=blue]
                      > That's a part that's not yet clear for me.[/color]

                      You can certainly do dynamic content with Zope/Plone, using Page
                      Templates and TAL and Scripts (Python) and so on (indeed, quite a
                      large portion of Plone is a collection of Page Templates and Python
                      scripts). It's probably possible to use Plone and Spyce at the same
                      time, but I can't see why you'd want to.

                      Cheers,
                      mwh
                      PS: Page Templates rule.

                      --
                      I think if we have the choice, I'd rather we didn't explicitly put
                      flaws in the reST syntax for the sole purpose of not insulting the
                      almighty. -- /will on the doc-sig

                      Comment

                      • flupke

                        #12
                        Re: python web programming / CMS

                        "Michael Hudson" <mwh@python.net > schreef in bericht
                        news:m3fzavnfy3 .fsf@pc150.math s.bris.ac.uk...
                        [color=blue]
                        > You can certainly do dynamic content with Zope/Plone, using Page
                        > Templates and TAL and Scripts (Python) and so on (indeed, quite a
                        > large portion of Plone is a collection of Page Templates and Python
                        > scripts). It's probably possible to use Plone and Spyce at the same
                        > time, but I can't see why you'd want to.[/color]

                        The reason why i would want to use Plone and Spyce is that Spyce
                        provides an easy way to include/embed python code in a html file like
                        one would do with a jsp page.
                        I don't think that Plone supports something like that or at least not
                        that nice but i could be wrong.

                        flupke


                        Comment

                        • Michael Hudson

                          #13
                          Re: python web programming / CMS

                          "flupke" <flupke@nonexis tingdomain.com> writes:
                          [color=blue]
                          > "Michael Hudson" <mwh@python.net > schreef in bericht
                          > news:m3fzavnfy3 .fsf@pc150.math s.bris.ac.uk...
                          >[color=green]
                          > > You can certainly do dynamic content with Zope/Plone, using Page
                          > > Templates and TAL and Scripts (Python) and so on (indeed, quite a
                          > > large portion of Plone is a collection of Page Templates and Python
                          > > scripts). It's probably possible to use Plone and Spyce at the same
                          > > time, but I can't see why you'd want to.[/color]
                          >
                          > The reason why i would want to use Plone and Spyce is that Spyce
                          > provides an easy way to include/embed python code in a html file like
                          > one would do with a jsp page.
                          > I don't think that Plone supports something like that or at least not
                          > that nice but i could be wrong.[/color]

                          That's what Page Templates are! Ish. Well, Page Templates solve the
                          same problem, though you're encouraged to put significant logic in
                          Python scripts which you call from the template. I happen to agree
                          with the designers of Page Templates that this is a very good idea; I
                          guess others might differ.

                          Cheers,
                          mwh

                          --
                          I have long since given up dealing with people who hold idiotic
                          opinions as if they had arrived at them through thinking about
                          them. -- Erik Naggum, comp.lang.lisp

                          Comment

                          Working...