blob: f104ab9fa44fa9694fa61f74461b2ba0bbcf9b35 [file] [log] [blame]
Hal Canaryd7b38452017-12-11 17:46:26 -05001#! /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)