casperjs 319 Bytes
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/python" ]; then
  "$basedir/python"  "$basedir/../casperjs/bin/casperjs" "$@"
  ret=$?
else 
  python  "$basedir/../casperjs/bin/casperjs" "$@"
  ret=$?
fi
exit $ret