This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jason.Vas.Dias
Recipients Jason.Vas.Dias, georg.brandl, r.david.murray
Date 2011-04-30.16:06:10
SpamBayes Score 0.00047135682
Marked as misclassified No
Message-id <1304179571.03.0.920600241867.issue11946@psf.upfronthosting.co.za>
In-reply-to
Content
Oops, thought there may be gotchas to that multi-arch python wrapper -
it wasn't quoting its arguments properly - here is now what I have as
/usr/bin/python :

$ cat python
#!/bin/bash
ME=$0
ME=${ME##*/}
VERSION=${ME#python}
VERSION=${VERSION:-2.7}
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 -n "$'$a'"')"' ";done
eval "exec $CMD"

I had to move the /usr/bin/python${VERSION} executables to 
/usr/bin/python${VERSION}.bin , and replace them with copies
of this python script (which runs whichever version it is named by).

And I can do:

$ python -c 'import os
import sys
import commands
print commands.getstatus("ls -ld /.")
'
drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.

under both the native x86_64 and a 'setarch i686' environment with
the same results.
History
Date User Action Args
2011-04-30 16:06:11Jason.Vas.Diassetrecipients: + Jason.Vas.Dias, georg.brandl, r.david.murray
2011-04-30 16:06:11Jason.Vas.Diassetmessageid: <1304179571.03.0.920600241867.issue11946@psf.upfronthosting.co.za>
2011-04-30 16:06:10Jason.Vas.Diaslinkissue11946 messages
2011-04-30 16:06:10Jason.Vas.Diascreate