2010/11/13 Eric Blake <eblake(a)redhat.com>:
On 11/13/2010 08:53 AM, Matthias Bolte wrote:
> This is more flexible regarding the location of the python binary
> but doesn't allow to pass the -u flag. The -i flag can be passed
> from inside the script using the PYTHONINSPECT env variable.
>
> This fixes a problem with the esx_vi_generator.py on FreeBSD.
> ---
> examples/python/dominfo.py | 2 +-
> examples/python/domrestore.py | 2 +-
> examples/python/domsave.py | 2 +-
> examples/python/domstart.py | 2 +-
> examples/python/esxlist.py | 2 +-
> python/generator.py | 2 +-
> python/libvirt-override.py | 5 +++++
> src/esx/esx_vi_generator.py | 2 +-
> 8 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/examples/python/dominfo.py b/examples/python/dominfo.py
> index e41709c..2f250e7 100755
> --- a/examples/python/dominfo.py
> +++ b/examples/python/dominfo.py
> @@ -1,4 +1,4 @@
> -#! /usr/bin/python
> +#!/usr/bin/env python
ACK. It still assumes a hard-coded location, but /usr/bin/env is more
likely to exist on all platforms, regardless of where python was
installed. It's a shame that #! lines are so limited, and portably take
only one argument, which is now "python".
Thanks, pushed.
Matthias