Modules and script hard code /usr/bin/python in hashbang
A number of modules, and scripts in the test suite start with
#!/usr/bin/python
In general it is better to use
#!/usr/bin/env python
because that allows execution inside a virtualenv, or when python is installed elsewhere, e.g. /usr/loca/bin/python.
There may be cases in which we really do want to hard code the path, e.g.
- testing detection/selection of
ansible_python_interpreter(correct name?) - mechanics of Ansible module transfer, or recognition .
If so those should be explictly noted in a comment.
I think there's a typo above, both cases are #!/usr/bin/env python which I think is just the "right" one?
I think it a typo in the description with the correct title.
grep /usr/bin/python -r * | awk -F ':' '{print $1}' | uniq | wc -l
36
Sorry for the confusion, I've amended the description.
#849
#929