#!/bin/sh # Run scripts with Python (and modpy.sh if needed) if possible, rather # than the modXXX script (which only works correctly if Python 2.3 is installed) modpy="../../bin/modpy.sh" # If modpy.sh doesn't exist, assume we have Python set up correctly already # (e.g. Mac or RPM install, or PYTHONPATH and LD_LIBRARY_PATH set): if test "${PYTHON}x" != "x"; then pyint="${PYTHON}" else pyint="python" fi if test ! -f ${modpy}; then modpy="${pyint}" else modpy="${modpy} ${pyint}" fi # Only use Modeller through Python if 1) an import succeeds, 2) the 'modeller' # module imported is really Modeller (not a spurious modeller.py in the path # somewhere) and 3) the version matches that these examples were built with run_version=`${modpy} - 2>/dev/null <