web Develop question

G

gerkarcher

hi guys ,

I' m new to python ...and I would like to ask you , wich is the best
template for developing dinamic generated pages using python ?

I would like to use something easy to install and develop like php <?
? > tags and with a lots of features .

thanks in advance and sorry for this silly question .

regards,

richard
 
?

=?iso-8859-1?q?Luis_M._Gonz=E1lez?=

hi guys ,

I' m new to python ...and I would like to ask you , wich is the best
template for developing dinamic generated pages using python ?

I would like to use something easy to install and develop like php <?
? > tags and with a lots of features .

thanks in advance and sorry for this silly question .

regards,

richard

I suppose you're asking about frameworks.
There are many to choose from. There are two that are getting a lot of
attention lately: Django and Turbogears, but it seems there are as many
options as developers out there...
If you're running your own server, you can choose anyone.
The real problem is finding a shared hosting service with the option of
your choice (at an affordable price).

I am very comfortable with bare-bones mod_python. Mod_python is a
module that embeds the python interpreter into Apache (a la php). It is
not a framework (what's more, many frameworks rely on mod_python), but
it gives you many facilities for web development.

I find specially handy its publisher handle, which lets you match urls
to pages.
It can be complemented with a template system, like Cheetah (very good)
or its own PSP (python server pages implementation) as a template
system.
It also gives you the best performance (as far as I know, please
correct me if I'm wrong).

Luis
 
F

Fredrik Lundh

I' m new to python ...and I would like to ask you , wich is the best
template for developing dinamic generated pages using python ?

I would like to use something easy to install and develop like php <?
? > tags and with a lots of features .

thanks in advance and sorry for this silly question .

for a start, look under "templating engines" on this page:

http://wiki.python.org/moin/WebProgramming

(hint: googling for stuff works pretty well, too ;-)

</F>
 
G

gerkarcher

Dear Luis ,

Thanks for your kindly answer , so you say that installing mod_python
and a template like chetaah or dyango I can do like as I do with php
and Apache ?

< ?
print........
?>


Thanks ,
regards
Richard





Luis M. González ha escrito:
 
?

=?iso-8859-1?q?Luis_M._Gonz=E1lez?=

Dear Luis ,

Thanks for your kindly answer , so you say that installing mod_python
and a template like chetaah or dyango I can do like as I do with php
and Apache ?

Do not get confussed:
Django is a complete web development framework, and "Cheetah" is just a
template engine.

You don't need any framework to use mod_python (although many
frameworks use mod_python as a deployment option, as well as CGI or
FastCGI, etc).
Mod_python is just the module that lets you use python with Apache.

However, it has some built-in capabilities for letting you build web
sites.
They are called "handlers". You can write your own handlers, or you can
use the ones included within mod_python.

The main two handlers are:
1) PSP: this stands for Python Server Pages, and it is a way to parse
scripts in a PHP-like way. For example, you enclose your python
instructions between <% and %> tags, and your can mix them within html.
However, it is not very polished and I would recomend it...

2) Publisher: It lets you write scripts where you define functions,
that correspond to different pages. For example, if you define a
function "index" it will contain the code to display your main page.
This way you can create a whole site with only one script.
You can include html code within these functions, but it is recommended
to use a template system combined with publisher, in order to separate
presentation and logic.
Cheetah is a very good templating engine.

I suggest you start by reading mod_python's documentation, and then,
when you are up and running with all your installation, you can check
Cheetah...

Hope it helps...

Luis
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top