| OLD | NEW |
| 1 #!/bin/env python | |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 5 | 4 |
| 6 """Platform-specific utilities and pseudo-constants | 5 """Platform-specific utilities and pseudo-constants |
| 7 | 6 |
| 8 Any functions whose implementations or values differ from one platform to | 7 Any functions whose implementations or values differ from one platform to |
| 9 another should be defined in their respective platform_utils_<platform>.py | 8 another should be defined in their respective platform_utils_<platform>.py |
| 10 modules. The appropriate one of those will be imported into this module to | 9 modules. The appropriate one of those will be imported into this module to |
| 11 provide callers with a common, platform-independent interface. | 10 provide callers with a common, platform-independent interface. |
| 12 """ | 11 """ |
| 13 | 12 |
| 14 import sys | 13 import sys |
| 15 | 14 |
| 16 # We may not support the version of Python that a user has installed (Cygwin | 15 # We may not support the version of Python that a user has installed (Cygwin |
| 17 # especially has had problems), but we'll allow the platform utils to be | 16 # especially has had problems), but we'll allow the platform utils to be |
| 18 # included in any case so we don't get an import error. | 17 # included in any case so we don't get an import error. |
| 19 if sys.platform in ('cygwin', 'win32'): | 18 if sys.platform in ('cygwin', 'win32'): |
| 20 from platform_utils_win import * | 19 from platform_utils_win import * |
| 21 elif sys.platform == 'darwin': | 20 elif sys.platform == 'darwin': |
| 22 from platform_utils_mac import * | 21 from platform_utils_mac import * |
| 23 elif sys.platform.startswith('linux'): | 22 elif sys.platform.startswith('linux'): |
| 24 from platform_utils_linux import * | 23 from platform_utils_linux import * |
| OLD | NEW |