treeio/treeio — pull request #15 by francescortiz (2012-02-24 09:15:39+00:00)
Title: More portability

This patch makes installdb command use the python executable that triggered the command when calling subprocess.call(...)

Simple, straighforward.

Background: though python binary calls appear in some other places, like bash scripts or manage.py, it is a usual task to adapt your scripts when setting up a server (fcgi script, etc). Also, manage.py calls the python binary inside the virtualenv, so it perfectly fine. But these two python executable calls are within the actual code, so it is hard to figure out what is going on when you run "python2 manage.py installdb" and it fails because it is using your default python instance (python 3.2 in my case).