Sha256: 824d3baf34ae2bcc265d702e5a8f358ff375fd749ef2802b1d69920fb8b9a415
Contents?: true
Size: 1.5 KB
Versions: 12
Compression:
Stored size: 1.5 KB
Contents
#!/usr/bin/env python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """A convenience wrapper for starting gcutil.""" import os import sys # Checks the Python version. if not hasattr(sys, 'version_info'): sys.stderr.write('Very old versions of Python are not supported. Please ' 'use version 2.6 or greater.\n') sys.exit(1) if tuple(sys.version_info[:2]) < (2, 6): sys.stderr.write('Python %d.%d is not supported. Please use version 2.6 ' 'or greater.\n' % tuple(sys.version_info[:2])) sys.exit(1) def main(): """Launches ./bin/gcutil.""" python_bin = sys.executable if not python_bin: sys.stderr.write('Could not find Python executable.') sys.exit(1) gcutil_main = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'lib', 'google_compute_engine', 'gcutil', 'gcutil') os.execv(python_bin, [python_bin, '-S', gcutil_main] + sys.argv[1:]) if __name__ == '__main__': main()
Version data entries
12 entries across 6 versions & 2 rubygems