#!/bin/sh

attach tcl > /dev/null

# Add paths to libraries python is linked against.
paths="/mit/python/lib:/mit/tcl/arch/${ATHENA_SYS}/lib"

if test -n "${LD_LIBRARY_PATH}" ; then 
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}: ;
fi

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${paths}

# This needs to be exported so that the above library directories are
# accessible to the python process.  If you don't do that, and
# LD_LIBRARY_PATH is not set, then the value will not be passed to the
# python process.
export LD_LIBRARY_PATH

exec /bin/athena/attachandrun python python2.1 python "$@"
