开发者

GAE, Python 2.5, Python 2.6 Side-by-side on windows

On my development system, I have Python 2.6, Django 1.1 and GAE.

  • I have three projects running on Python 2.6 and Django 1.1.
  • I have 1 project using GAE, Python 2.6 and Django 1.1.

I have heard that my set-up for running GAE using Python 2.6 may create some head-scratching problems while deploying it on the production server, because GAE supports only Python 2.5, and using 2.6 is not recommended.

Can I develop GAE application using Python 2.6? If not, what should I do? I am using Windows Vista as my development system.

Please note : I don't want to disturb my 开发者_C百科other projects in development, which uses Python 2.6 and Django 1.1.


Use virtualenv to isolate your development environments, so you can have one running 2.5 and the others running 2.6.

Edited to add: once 2.5 is installed, you can initialize your virtualenv to use it with the -p option:

virtualenv -p /path/to/python2.5/python.exe destination_dir


Unless you are using python 2.6 specific syntax/code your application is safe to run on GAE.


Re virtualenv question above: virtualenv have a parameter --python=PYTHON_EXE that you can point to the interpreter you'd like it to use. Running virtualenv without parameters or with an --help option whill show you which options you may pass it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜