1#! /usr/bin/env python2 2# Copyright 2017 Google Inc. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import os 7import subprocess 8import sys 9 10def sysopen(arg): 11 plat = sys.platform 12 if plat.startswith('darwin'): 13 subprocess.call(["open", arg]) 14 elif plat.startswith('win'): 15 os.startfile(arg) 16 else: 17 subprocess.call(["xdg-open", arg]) 18 19if __name__ == '__main__': 20 for a in sys.argv[1:]: 21 sysopen(a) 22