RH software collections - how to pass arguments ?

Latest response

Hi all,

I am trying to write python script running on RH 6 using python 2.7 from Software Collections (SCL).
Since I couldn't find any way to use shebang with SCL I am trying to use
a workaround: run bash script which enables python27 SCL and run python script.

The script should recognize all arguments and pass it to python:

#!/bin/bash
/usr/bin/scl enable python27 'python simple.py ${@}'

The simple.py:

import sys
print len(sys.argv)
print sys.argv
sys.exit(0)

But it doesn't work - no arguments are passed to python script.
Can anybody help me ?

How can I do that ?

Responses