Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python3 on the Web

Reply
Thread Tools

Python3 on the Web

 
 
Johannes Permoser
Guest
Posts: n/a
 
      03-05-2009
Hi,

I wanted to learn Python from scratch and start off with Version 3.
Since I already know PHP very well, I thought it would be nice to start
off with a small web-project.

But what's the way to bring python3 to the Web?
mod_python isn't available, cgi is said to be slow, mod_wsgi looks
complicated...

What would you suggest?

Greets, JP
 
Reply With Quote
 
 
 
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      03-05-2009
Johannes Permoser a écrit :
> Hi,
>
> I wanted to learn Python from scratch and start off with Version 3.
> Since I already know PHP very well, I thought it would be nice to start
> off with a small web-project.
>
> But what's the way to bring python3 to the Web?
> mod_python isn't available, cgi is said to be slow,


This comes from the CGI architecture by itself (IOW: it's totally
unrelated to the language used).

> mod_wsgi looks
> complicated...


It isn't, really - at least if you have enough knowledge of the HTTP
protocol, webservers and Python !-)

> What would you suggest?



If what you want is to learn *Python*, start with CGI (it'll teach you a
lot about text processing and even possibily about web programming too)
- but be prepared to find CGI *very* low-level compared to PHP.

Else, forget about Python 3, and try some of the nice frameworks like
Django, Pylons, web.py etc...

 
Reply With Quote
 
 
 
 
Graham Dumpleton
Guest
Posts: n/a
 
      03-05-2009
On Mar 6, 4:13*am, Johannes Permoser <ee...@yahoo.de> wrote:
> Hi,
>
> I wanted to learn Python from scratch and start off with Version 3.
> Since I already know PHP very well, I thought it would be nice to start
> off with a small web-project.
>
> But what's the way to bring python3 to the Web?
> mod_python isn't available, cgi is said to be slow, mod_wsgi looks
> complicated...


Is it WSGI you really mean is complicated or mod_wsgi itself? They are
not the same thing, with mod_wsgi just being one implementation of
WSGI.

In comparison to mod_python the mod_wsgi package is simpler to install
and setup, but then if you really meant WSGI as a concept then it is a
different matter and yes without using some higher level WSGI
framework or toolkit, then WSGI can be a bit more daunting and might
appear more complicated, or at least less helpful, than mod_python as
far as getting started. This is because mod_python is actually two
parts. These parts are the low level web server interface, akin to
WSGI level, and its higher level handlers. The mod_wsgi package
doesn't have the higher level handlers as expected you would use any
WSGI capable package for that.

As others have said, perhaps start out with Python 2.X for now if you
are just getting into this. This is because little work has been done
yet on getting any of the Python web frameworks/toolkits running on
Python 3.0 even if mod_wsgi is already ready (subversion copy) to host
them on Apache.

Graham
 
Reply With Quote
 
Paul Rubin
Guest
Posts: n/a
 
      03-08-2009
Tim Roberts <> writes:
> At that level of load, CGI is perfectly workable, and it's certainly the
> easiest of the choices for development and exploration.


One problem of CGI even at very low loads is that it's harder to
handle the case where two hits arrive at the same time and want to
save data. You either have to mess around with file locking and
waiting, or use an external database that handles concurrency
(normally this means you end up with a persistent process anyway), or
some other kludge. With a persistent server you can use
SocketServer.ThreadingServer and ordinary python queues to communicate
with a single thread that's in charge of the persistent data.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: is the same betweent python3 and python3.2? Andrew Berg Python 0 06-16-2012 11:11 AM
Python3 Web Framework Aman Python 5 01-01-2011 02:53 AM
python3: 'where' keyword Andrey Tatarinov Python 97 01-16-2005 12:04 PM
python and macros (again) [Was: python3: 'where' keyword] michele.simionato@gmail.com Python 37 01-14-2005 10:24 PM
Python3: on removing map, reduce, filter Andrey Tatarinov Python 18 01-11-2005 07:22 AM



Advertisments