Web development with Python 3.1

A

Alan Harris-Reid

I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none of
the popular python-to-web frameworks (Django, CherryPy, web.py, etc.)
are Python3 compatible yet.

So, what can I use to start my web programming experience using 3.1?

Any help would be appreciated.

Alan
 
P

Paul Rubin

Alan Harris-Reid said:
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none
of the popular python-to-web frameworks (Django, CherryPy, web.py,
etc.) are Python3 compatible yet.

So, what can I use to start my web programming experience using 3.1?

Does it occur to you that the unavailability of those frameworks is
part of the REASON they say to use 2.x? Have you answered your own
question?

Anyway, for simple web programming, frameworks are not worth the
hassle. Just use the cgi module.

If you want to use a framework, well, you are the one who decided to
zoom off into the 3.1 wilderness before the framework developers got
there. If you're an experienced programmer in other languages and
you're determined to use a framework, maybe a worthwhile Python
learning project would be to help port your favorite framework to 3.1.
 
C

Chris Withers

Brendon said:
I can vouch for what Paul says. I started in Python 3 years ago, and I
did so with a web application (still working on it!). I'm using the cgi
approach, and it certainly teaches you the concepts. I fail to see how
starting with a framework is a good idea if you don't know how the
frameworks work (or what they're actually doing). It would be a bit like
doing a web page in Dreamw***er and thinking you understand HTML/CSS.

I couldn't agree less. Using the CGI module is more akin to trying to
write Dreamweaver when you want to build a static website...

Just use 2.6 and pick a framework of your choice. From what the OP
described, Django or Pylons would fit the bill well.

Chris
 
A

Aaron Watters

I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none of
the popular python-to-web frameworks (Django, CherryPy, web.py, etc.)
are Python3 compatible yet.

So, what can I use to start my web programming experience using 3.1?

Any help would be appreciated.

Alan

Don't. use python 2.6 with WHIFF :)
http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index
http://whiff.sourceforge.net

-- Aaron Watters

===
It gotta be rock-roll music
if you wanna dance with me
if you wanna dance with me
 
M

Martin v. Löwis

I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none of
the popular python-to-web frameworks (Django, CherryPy, web.py, etc.)
are Python3 compatible yet.

That's not entirely true, see

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

Regards,
Martin
 
M

Martin v. Löwis

I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none of
the popular python-to-web frameworks (Django, CherryPy, web.py, etc.)
are Python3 compatible yet.

That's not entirely true, see

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

Regards,
Martin
 
J

John Nagle

Alan said:
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1

Until MySQLdb gets ported to something later than Python 2.5, support
for a "data-based web site" probably has to be in Python 2.5 or earlier.

The C module situation for Python 3.x still isn't very good.
Realistically, the production version of Python is 2.5. This process
is taking long enough that I'm worried that Python 3.x could do for
Python what Perl 6 did for Perl - provide an upgrade path that nobody
takes.

HTMLTemplate ("http://py-templates.sourceforge.net/htmltemplate/index.html")
is a minimal templating system for fill-in-the-blanks template work in Python.
Actually, if you have HTMLTemplate, FCGI, and MySQLdb, you have enough to
do a back-end database.

There are some advantages to libraries (you call them) over "frameworks"
(they call you) if you're doing something unusual. Frameworks are more
useful if you're doing yet another "Web 2.0" web site.

John Nagle
 
P

Paul Rubin

John Nagle said:
Until MySQLdb gets ported to something later than Python 2.5, support
for a "data-based web site" probably has to be in Python 2.5 or earlier.

Even 2.6 is too bleeding-edge? Uh oh, Fedora 12 is shipping it.
 
D

Dotan Cohen

Even 2.6 is too bleeding-edge?  Uh oh, Fedora 12 is shipping it.
Fedora has traditionally been known as a bleeding edge distro.
 
B

Bruno Desthuilliers

John Nagle a écrit :
Until MySQLdb gets ported to something later than Python 2.5, support
for a "data-based web site" probably has to be in Python 2.5 or earlier.

hem....

bruno@bruno:~$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.<module 'MySQLdb' from
'/var/lib/python-support/python2.6/MySQLdb/__init__.pyc'>

You said ???

(snip)
Frameworks are more
useful if you're doing yet another "Web 2.0" web site.

I beg to disagree.
 
J

John Nagle

Diez said:
The usual FUD from you.

http://pypi.python.org/pypi/MySQL-python/1.2.3c1

And of course there are other alternatives to databases, which happily
run under 2.6 as well.

Diez

The main web site for MySQLdb says it is only supported through Python 2.5.

"http://sourceforge.net/projects/mysql-python/"

"MySQL support for Python. MySQL versions 3.23-5.1; and Python versions 2.3-2.5
are supported."

There does seem to be a 2.6 download for Linux, but the SourceForge download
for Windows is for Python 2.5. Maybe the 2.6 version, with a "c1" suffix,
is an unsupported release candidate.

John Nagle
 
A

Alan Harris-Reid

John said:
Until MySQLdb gets ported to something later than Python 2.5, support
for a "data-based web site" probably has to be in Python 2.5 or earlier.

The C module situation for Python 3.x still isn't very good.
Realistically, the production version of Python is 2.5. This process
is taking long enough that I'm worried that Python 3.x could do for
Python what Perl 6 did for Perl - provide an upgrade path that nobody
takes.

HTMLTemplate
("http://py-templates.sourceforge.net/htmltemplate/index.html")
is a minimal templating system for fill-in-the-blanks template work in
Python.
Actually, if you have HTMLTemplate, FCGI, and MySQLdb, you have enough to
do a back-end database.

There are some advantages to libraries (you call them) over
"frameworks"
(they call you) if you're doing something unusual. Frameworks are more
useful if you're doing yet another "Web 2.0" web site.

John Nagle

</div>

Thanks for the advice John. I am concerned at what you say about the
uptake of 3.x - you could be right (although I hope you eventually
turn-out to be wrong :) ).

Regards
Alan
 

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
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top