1 # Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file 2 # for details. All rights reserved. Use of this source code is governed by a 3 # BSD-style license that can be found in the LICENSE file. 4 5 import imp 6 import os 7 8 TOOLS_DIR = os.path.abspath( 9 os.path.normpath(os.path.join(__file__, '..', '..'))) 10 11 def GetUtils(): 12 '''Dynamically load the tools/utils.py python module.''' 13 return imp.load_source('utils', os.path.join(TOOLS_DIR, 'utils.py')) 14