On Mar 18, 2015, at 05:31 PM, Victor Stinner wrote:
Does it work to pass command line options to Python in the shebang?
Yes, but only one "word", thus -Es or -I. We've often mused about whether it makes sense to have two Pythons on the system. One for system scripts and another for users. System Python ('/usr/bin/spython' perhaps) would be locked down and only extensible by system packages. On Debuntu that might mean no /usr/local on sys.path. It would also have a much more limited set of installed packages, i.e. only those needed to support system functionality. /usr/bin/python2 and /usr/bin/python3 then would be user tools, with all the goodness they currently have. It's never gotten much farther than musings, but protecting the system against the weird things people install would be a good thing. OTOH, this feels a lot like virtual environments so maybe there's something useful to be mined there. Cheers, -Barry