Skip

3.1 don't fail me now
February 10, 2011 7:49 PM   Subscribe

I taught myself Python 3.1... But, Django only works with 2.x. What are the alternatives for a web application framework for a complex data driven website that work with 3.1?

I don't plan on teaching myself the outdated python in order to skip a year of waiting for Django. What are my alternatives?
posted by elationfoundation to Computers & Internet (7 answers total) 6 users marked this as a favorite
 
Python 3 came out in 2008. There's more to the "slowness" of adoption than the fact that it's new. Python 3 is a backwards-incompatible release, sort of a reboot. It's possible it may never really catch on (see Perl 6 for a similar example)
posted by RustyBrooks at 7:56 PM on February 10, 2011


Python 3 isn't drastically different from Python 2. They're still both Python, so you wouldn't be learning an entirely new language with Python 2. I would just dive into Django and figure out the Python 2/3 quirks as they come. It really is the mainstay framework for Python.
posted by mnemonic at 8:08 PM on February 10, 2011


Python 3 irons out minor some longstanding warts in Python, but it's just different enough to break a lot of existing code and library interfaces. Point being you shouldn't have any trouble switching back and forth between 2 and 3 unless you're doing very serious code, and it's possible Python 3 will never really catch on in any case.
posted by miyabo at 8:09 PM on February 10, 2011


It's not really right to think of Python 2.7.1, released a mere three months ago, as "outdated." The default docs page on python.org is for 2.7.1. Python 2 is what most people use, and lots of other packages are available only for Python 2. Many Python 3 features have been backported to Python 2.7.

If you are a new Python user, you are unlikely to use a ton of the features that differentiate Python 3. Stick
from __future__ import absolute_import, division, print_function, unicode_literals
at the beginning of each Python file you write and it will act like Python 3 as much as possible.
posted by grouse at 8:09 PM on February 10, 2011 [4 favorites]


You should use Django in Python 2.7. Python 2.7 is just fine, grouse's instructions above will make Python 2.7 more Pyhon 3ish. It should all be Django compatible.
posted by Nelson at 8:20 PM on February 10, 2011


I teach Python to undergrads and graduate students, and I don't bother teaching Python 3. As pointed out upthread, 3 has been out for years now, and there are still many third party tools and frameworks that don't work with it (Django, notably, but also Google App Engine and Jython). I know this seems counterintuitive, but your best long-term strategy here really is to get familiar with 2.7.
posted by aparrish at 8:48 PM on February 10, 2011


+1 use py2.7. I've been working with python for years and work with it every day and I haven't even installed 3.x yet. (yes, mostly because of django). Take a look at: what's new in py3.0. It will take you very little time to adjust to 2.7 and then to switch back to 3.x again whenever/ifever django works on it.
posted by rainy at 10:46 PM on February 10, 2011


« Older What was that music webapp I h...   |  I'm in need of graduate level ... Newer »
This thread is closed to new comments.


Post