473,395 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Jul 18 '05 #1
12 1954
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.

Jul 18 '05 #2
"Arcane" <ar****@deepfort.com> schreef in bericht
news:ma**************************************@pyth on.org...
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

Jul 18 '05 #3
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.
Jul 18 '05 #4
In article <EO********************@phobos.telenet-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
Jul 18 '05 #5
> 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.
Jul 18 '05 #6
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
Jul 18 '05 #7
> 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.

Jul 18 '05 #8
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

Jul 18 '05 #9
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 ;)

Jul 18 '05 #10
"flupke" <fl****@nonexistingdomain.com> 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
Jul 18 '05 #11
"Michael Hudson" <mw*@python.net> schreef in bericht
news:m3************@pc150.maths.bris.ac.uk...
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
Jul 18 '05 #12
"flupke" <fl****@nonexistingdomain.com> writes:
"Michael Hudson" <mw*@python.net> schreef in bericht
news:m3************@pc150.maths.bris.ac.uk...
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
Jul 18 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
226
by: Stephen C. Waterbury | last post by:
This seems like it ought to work, according to the description of reduce(), but it doesn't. Is this a bug, or am I missing something? Python 2.3.2 (#1, Oct 20 2003, 01:04:35) on linux2 Type...
49
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
38
by: kbass | last post by:
In different articles that I have read, persons have constantly eluded to the productivity gains of Python. One person stated that Python's productivity gain was 5 to 10 times over Java in some in...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
35
by: John Coleman | last post by:
Greetings, I have a rough classification of languages into 2 classes: Zen languages and tool languages. A tool language is a language that is, well, a *tool* for programming a computer. C is the...
17
by: MilkmanDan | last post by:
I'll be a college freshman this fall, attending Florida Institute of Tech studying electrical engineering. I was considering taking some classes in programming and computer science, and I...
852
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for...
0
by: wesley chun | last post by:
Need to get up-to-speed with Python as quickly as possible? Come join me, Wesley Chun, author of Prentice-Hall's bestseller "Core Python Programming," for another comprehensive intro course plus a...
0
by: wesley chun | last post by:
*** FINAL REMINDER also, the course begins on monday immediately following the *free* CodeCamp conference http://siliconvalley-codecamp.com (click Program => Sessions to see all the talks)... 5...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.