def load_pex(path_to_pex, include_deps=True):
abs_path_to_pex = os.path.abspath(path_to_pex)<EOL>Log.debug("<STR_LIT>" % abs_path_to_pex)<EOL>if abs_path_to_pex not in sys.path:<EOL><INDENT>sys.path.insert(<NUM_LIT:0>, os.path.dirname(abs_path_to_pex))<EOL><DEDENT>if include_deps:<EOL><INDENT>for dep in _get_deps_list(abs_path_to_pex):<EOL><INDENT>to_join = os.path.join(os.path.dirname(abs_path_to_pex), dep)<EOL>if to_join not in sys.path:<EOL><INDENT>Log.debug("<STR_LIT>" % dep)<EOL>sys.path.insert(<NUM_LIT:0>, to_join)<EOL><DEDENT><DEDENT><DEDENT>Log.debug("<STR_LIT>" % str(sys.path))<EOL>
Loads pex file and its dependencies to the current python path