def generate_bin_search_paths(program, extra_dirs):
 if (os.sep in program):
  paths = [program]
 else:
  arg_paths = itertools.chain(os.environ.get('PATH', '').split(os.pathsep), extra_dirs)
  search_paths = unique_not_false_list(arg_paths)
  paths = path_joiner(program, search_paths)
 return paths

def generate_bin_search_paths ( program , extra_dirs ) : if ( os . sep in program ) : paths = [ program ] else : arg_paths = itertools . chain ( os . environ . get ( 'PATH' , '' ) . split ( os . pathsep ) , extra_dirs ) search_paths = unique_not_false_list ( arg_paths ) paths = path_joiner ( program , search_paths ) return paths
generate full paths of potential locations of a given binary file based on common_bin_paths .