views:

98

answers:

3

Currently I have python 3.1.1 installed on my system, same version on my server with WSGI 3.0 running on Apache 2.2.

I want to keep using python 3.1, but I'm finding that lots of libraries/frameworks don't support it yet, namely Django, Pylons, MySQLdb, etc.

I also checked an account I have on a friend's server, and it is running python 2.3.4...

I want to write a sort of blog/forum type application that I can expand into a CMS, and eventually write related desktop applications for, as sort of a long-term pet project.

I'd like to use the newest version of python possible for best security and highest consistency with the desktop-applications-to-be, while still maintaining a good level of portability, and supporting most of the frameworks and libraries I will use.

But I'm lost on which one I should pick. It seems like 2.4 would have the greatest amount of portability but it's sort of old, and I don't want to wind up using a bunch of post-2.4 features that won't compile, and having to re-write with messier code to compensate for it. 2.6 would be better, but it seems like lots of libraries are still porting over to that, and 3.1 would be the best since it eliminates a lot of cruft from the language.

One thing I'd like to highlight is that it'd be nice to know what I will be missing if I choose an older version of python. For example, if I were to need my application to run on my old python 2.3.4 account on my friend's server, what libraries/features would I be lacking that exist in newer versions? What problems would I surely run into that would make me wish I was using python 2.6 or 3.1? Which of these features would be available via __future__ imports?

So, what would be the best direction to go? Should I just use 2.6 and deal with any issues? Should I go for 2.4 to maximize my ability to possibly distribute it to shared hosting environments? Or should I just jump into 3.1 and have a slightly-crippled application until libraries like MySQLdb catch up?

+1  A: 

"2.6 would be better, but it seems like lots of libraries are still porting over to that"

What? What libraries -- that you need -- are "still porting over to that"?

"3.1 would be the best" "but I'm finding that lots of libraries/frameworks don't support"

Correct. You've stated that twice in the question. That's very clear.

"Should I just use 2.6 and deal with any issues"

What issues? Do you have any specific concerns?

It seems to work really, really well. What are your specific concerns?

S.Lott
I realized I read the 2.6 porting issues from an older blog. You're right that everything I need so far seems to work well on 2.6.I should have mentioned that I am completely new to python, so I really don't know all of the third party libraries or frameworks I may need or want to use. I was merely looking for a starting point to minimize any version-related issues I may run into
Carson Myers
"Do you have any specific concerns?" "What are your specific concerns?" You've stated that twice in your answer. That's very clear. (Being a jerk doesn't help.)
Cory Petosky
@Carson Myers: Absent actual issues, you have very little to worry about.
S.Lott
@Cory Petosky: Would you like me to fix the answer? Do you have a suggestion for what I should fix? You may be a far better writer and don't need help with editing. Sadly, I'm not a good writer. What problem do you see with my answer? I don't know what part of it is being a jerk. Can you provide some guidance for what I should change?
S.Lott
Like I said before, I wasn't _aware_ whether there were issues or not, and Cory said you were being a jerk because he found your answer to be very blunt and somewhat condescending. As did I. (edit) I also noticed you said you're not a very good writer, yet your profile says you are an aspiring writer, and have written a book. Sarcasm. Very friendly.
Carson Myers
@Carson Myers: I'm not sure what you're saying. Is there something that needs to be fixed in the answer? Is it incomplete? Is it incorrect? I can't do much about blunt unless you provide some guidance or hint on the ways that it's incomplete. I'm unaware of what constitutes "condescending". Is there specific text that causes problems? I'm trying to learn, and all I'm hearing is that the answer's "a jerk" or "unfriendly" or "blunt". But I can't figure out what to fix. I'd like to get some help rather than complaints.
S.Lott
+2  A: 

Begin with Python 2.5 if you're not sure.

Have a look at Google App Engine (based on Django). It's using Python 2.5 and it's free. However, you will not be able to call scipy (for example) or any libraries with "C" inside.

You will have the greatest amount of portability with Python2.5. Moreover, python3k is not really used in the industry.

Frederic
where is python 3 used? Or is it just not used in the industry _yet_? is it mainly just for scripts or desktop applications so far?
Carson Myers
libraries that are under active development will probably come out with Python 3 version gradually... cf. http://stackoverflow.com/questions/1700569/whats-going-on-with-python-3k-closed :)
Frederic
Python 3 isn't that widely used because it's an incompatible update. Old code normally needs work to make it Python 3 compatible. The same applies to the C APIs used for extensions. The work is a bit more than minor tweaking, and people don't like having to revisit old code. On the plus side, I don't believe Python 3 is going to end up like Perl 6. The changeover will happen, for the most part - it'll just take a while.
Steve314
@Carson Myers: Where is Python 3 used? See these related questions: http://stackoverflow.com/questions/tagged/python-3.x. It's just Python; it's used in the exact places Python 2 is used. As the libraries get converted it will replace Python 2.
S.Lott
+4  A: 

For now, Python 3 is not widely deployed in production. Depends on what you use Python for. If it's just for one off scripts, it will be ok either way, if the idea is to use third party modules, C modules and or deploy painlessly, then settle for any of the 2.4+ versions. Many projects strive to keep 2.3 compativility, but you shouldn't have any problems to use 2.4-2.6, as the changes in the language are minor. If you can, use 2.6, as it's the closest to Python 3, as it has some features backported to it.

The problem with Python 3 is a Catch 22:

  • most useful third party modules are still not ported to 3, as developers are waiting for wide usage,
  • people can't migrate because modules they rely on haven't migrated yet, keeping the sage low.

You should not have any problems using any of the 2.4-2.6, give 3, some time.

Use Python 2.6

voyager