1 #!/usr/bin/env python 2 3 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 4 # Use of this source code is governed by a BSD-style license that can be 5 # found in the LICENSE file. 6 7 import os 8 import sys 9 10 version = sys.version_info[:2] 11 if version != (2, 7): 12 sys.stderr.write('Systrace does not support Python %d.%d. ' 13 'Please use Python 2.7.\n' % version) 14 sys.exit(1) 15 16 systrace_dir = os.path.abspath( 17 os.path.join(os.path.dirname(__file__), 'catapult', 'systrace')) 18 sys.path.insert(0, systrace_dir) 19 20 from systrace import systrace 21 22 if __name__ == '__main__': 23 sys.exit(systrace.main()) 24