python web programming / CMS

A

Arcane

news.telenet.be said:
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.
 
N

news.telenet.be

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
 
P

Peter van Kampen

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
 
F

flupke

Arcane said:
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
 
D

Doug Holton

news.telenet.be said:
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.
 
A

asdf sdf

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

flupke

asdf said:
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
 
A

asdf sdf

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

flupke

asdf said:
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
 
A

asdf sdf

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 ;)
 
M

Michael Hudson

flupke said:
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.
 
F

flupke

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
 
M

Michael Hudson

flupke said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top