Author Jason.Vas.Dias
Recipients Jason.Vas.Dias, georg.brandl, r.david.murray
Date 2011-04-30.17:31:38
SpamBayes Score 0.00613643
Marked as misclassified No
Message-id <1304184699.31.0.641045772144.issue11946@psf.upfronthosting.co.za>
In-reply-to
Content
final python wrapper script :

$ cat python
#!/bin/bash
ME=$0
ME=${ME##*/}
VERSION=${ME#python}
VERSION=${VERSION:-2.7.1}
ARCH=`uname -m`
CMD=''
case $ARCH in
  i686)
     CMD="/usr/bin/32/${ME}"
     ;;
  *)
     CMD="/usr/bin/python${VERSION}.bin"
     ;;
esac
for((a=1;a<=$#;a++));do CMD="${CMD} '$(eval 'echo -e "$'$a'"' | sed 's/['"'"']/'"'"'"'"'"'"'"'"'/g')' " ;done
eval "exec $CMD"


now handles:

$ ./python -c 'import os
import sys
import commands
print commands.getstatus('"'"'/.'"'"')
'
drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.
History
Date User Action Args
2011-04-30 17:31:39Jason.Vas.Diassetrecipients: + Jason.Vas.Dias, georg.brandl, r.david.murray
2011-04-30 17:31:39Jason.Vas.Diassetmessageid: <1304184699.31.0.641045772144.issue11946@psf.upfronthosting.co.za>
2011-04-30 17:31:38Jason.Vas.Diaslinkissue11946 messages
2011-04-30 17:31:38Jason.Vas.Diascreate