#!/bin/bash if [ -d /usr/lib/python2.7/site-packages/weasyprint ]; then PYTHON='python2' elif [ -d /usr/lib/python3.2/site-packages/weasyprint ]; then PYTHON='python' else echo "Weasyprint for python{,2} not found" exit fi $PYTHON <