+# make it easy to switch versions of SWIG
+if [ "$SWIG" = "" ]; then
+ SWIG=/opt/swig/bin/swig-1.3.29
+fi
+
+
+function getpyver {
+ if [ "$1" = "15" ]; then
+ PYVER=1.5
+ elif [ "$1" = "20" ]; then
+ PYVER=2.0
+ elif [ "$1" = "21" ]; then
+ PYVER=2.1
+ elif [ "$1" = "22" ]; then
+ PYVER=2.2
+ elif [ "$1" = "23" ]; then
+ PYVER=2.3
+ elif [ "$1" = "24" ]; then
+ PYVER=2.4
+ else
+ echo You must specify Python version as first parameter.
+ exit
+ fi
+}
+
+getpyver $1
+shift
+
+python$PYVER -c "import sys;print '\n', sys.version, '\n'"
+