Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat version of Python should I be using to develop web applications?
    primarykey
    data
    text
    <p>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.</p> <p>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.</p> <p>I also checked an account I have on a friend's server, and it is running Python 2.3.4...</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>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 <em>wish</em> I was using Python 2.6 or 3.1? Which of these features would be available via <code>__future__</code> imports?</p> <p>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?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThat's probably a question only you can answer. I'd be surprised if you need to go as far back as 2.4. For 2.6, perhaps you can download the library source for 2.5 or 2.4 and build it yourself with only minor (if any) issues. Even then, only needed for C-based stuff, not stuff written in Python. But - you seem to know what the issues are already. Only you can decide how to balance the issues, and what the right answer is for you.
      singulars
    2. COyou're absolutely right, however the main reason I asked this question is because I am so painfully new to Python. I was hoping someone with experience in this field could point me in the right direction to minimize stupid problems I could have avoided with more insight. Really, I don't know all of the libraries or frameworks I may end up needing, so I wasn't confident I knew enough to make the decision. But the consensus seems to be that 2.5 or 2.6 is the best way to go.
      singulars
    3. COBe mindful of the issues when you are writing you unit tests. Try to write the tests themselves to be portable across many versions of Python and have good coverage so when the tests pass you are confident the app is ported correctly. This will make your life much easier when the time comes to upgrade
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload