Multi-platform Development with Python and Web2py.

Here are a list of suggestions that should help make your experience a more 
pleasant one.

Stick with Ubuntu LTS

First to reiterate pbreit comment on Ubuntu LTS version. If you are not 
developing Ubuntu itself or have no compelling reason to run the latest and 
greatest version of Ubuntu then stick with an LTS version. You will have far 
fewer problems with your host system and when you upgrade to the next LTS 
version things will go much more smoothly and most of your OS configuration 
and settings will continue to work as well.

Never Downgrade

Never ever downgrade Python (or anything else for that matter!). While a lot 
of things are designed to be upgradable ( like Web2py ) and maintain 
backward compatibility ( Web2py) nothing that I am aware of is designed to 
downgrade.

OK, so now what do you do!

To do cross platform development with Python and therefore Web2py you have 
three basic options from least to most desirable:

A) Trust ( verify and hope ) that your applications only uses features of 
the target Python version.

Traditional approach

This can works surprisingly well, in fact it is what people used to do all 
the time. The trick would be doing regular deployments and testing on your 
target platform both of which are "good" practices.

B) Use virtualenv to create a virtual python environment for running your 
application.

Recommended but adds another learning curve

virtualenv lets you create isolated Python environments. virtualenv works 
great but can significantly increase your short term learning curve as you 
will also need to learn about some other concepts and Python features such 
as pip. http://www.virtualenv.org/en/latest/index.html

C) Universal Python Installer.

Not recommended

This would be the perfect solution only it does not yet exist. The closest I 
have gotten is this project here:

http://code.google.com/p/uc-unified-python-installer/

but to my knowledge it does not work on GAE. It does give you a consistent 
automated installation of a "sandboxed" python versions on nix and nix like 
systems but must be manually modified to install anything but Python 2.6.7

Reply via email to