Suppose you write a Python shell script. It will probably start with something like this:
#!/usr/bin/python
The problem is, if you often work with virtualenv this call is just plain wrong. You actually would like this script to call virtualenv's python binary, if it is in this environment and /usr/bin/python/ otherwise. Just like your shell would decide, when you write python as a shell command.
How would you write your #! line to fulfil this requirement?