I have an alias for a command (I'm setting up a Python development environment)
alias python=~/virtualenv/bin/python
so that I can run ~/virtualenv/bin/python
by just typing python
. Now in my project there is a shell script that goes, for example:
#!/bin/sh
python run-project.py
Can I make the script use my aliased python
instead of the python
it finds in $PATH
, without making changes to the script?
#!/usr/bin/env python
at the top of your python scripts seems easier.