python web programming / CMS

Discussion in 'Python' started by Arcane, Apr 22, 2004.

  1. Arcane

    Arcane Guest

    news.telenet.be wrote:

    >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
    >
    >
    >
    >

    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.
    Arcane, Apr 22, 2004
    #1
    1. Advertising

  2. 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
    news.telenet.be, Apr 22, 2004
    #2
    1. Advertising

  3. In article <EOOhc.82192$-ops.be>, news.telenet.be wrote:
    > 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.


    Look at PSP. See www.modpython.org for mor information.

    > If one can't include python in html, is Zope the only alternative and
    > how does code look like then?


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

    Hth,

    PterK


    --
    Peter van Kampen
    pterk -- at -- datatailors.com
    Peter van Kampen, Apr 22, 2004
    #3
  4. Arcane

    flupke Guest

    "Arcane" <> schreef in bericht
    news:...
    > news.telenet.be wrote:
    >
    > >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
    > >
    > >
    > >
    > >

    > 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.


    (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
    flupke, Apr 22, 2004
    #4
  5. Arcane

    Doug Holton Guest

    news.telenet.be wrote:

    > 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
    >
    >

    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.
    Doug Holton, Apr 22, 2004
    #5
  6. Arcane

    asdf sdf Guest

    > 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?


    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.
    asdf sdf, Apr 22, 2004
    #6
  7. Arcane

    flupke Guest

    asdf sdf wrote:
    >
    > 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.


    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
    flupke, Apr 22, 2004
    #7
  8. Arcane

    asdf sdf Guest

    > 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
    >


    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.
    asdf sdf, Apr 22, 2004
    #8
  9. Arcane

    flupke Guest

    asdf sdf wrote:
    >> 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
    >>

    >
    > 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.


    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
    flupke, Apr 23, 2004
    #9
  10. Arcane

    asdf sdf Guest


    > 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
    >
    >
    >

    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 ;)
    asdf sdf, Apr 23, 2004
    #10
  11. "flupke" <> writes:

    > 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?


    Er. I'm not sure that really makes sense.

    > Or is plone going to send the pages to Zope?


    Or that :)

    > That's a part that's not yet clear for me.


    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
    Michael Hudson, Apr 23, 2004
    #11
  12. Arcane

    flupke Guest

    "Michael Hudson" <> schreef in bericht
    news:...

    > 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.


    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
    flupke, Apr 23, 2004
    #12
  13. "flupke" <> writes:

    > "Michael Hudson" <> schreef in bericht
    > news:...
    >
    > > 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.

    >
    > 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.


    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
    Michael Hudson, Apr 23, 2004
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jensen bredal
    Replies:
    2
    Views:
    2,932
    Lucas Tam
    Mar 15, 2005
  2. Spam Survivor
    Replies:
    3
    Views:
    491
    Nick Kew
    Sep 15, 2003
  3. Jo
    Replies:
    2
    Views:
    379
  4. webMODULES
    Replies:
    0
    Views:
    1,261
    webMODULES
    May 8, 2006
  5. VB
    Replies:
    0
    Views:
    369
Loading...

Share This Page