<commit_before>from __future__ import print_function, division, absolute_import

import os
import sys
from os.path import isfile, join, expanduser

import conda.config as cc
from conda_build.config import build_prefix



if sys.platform == 'win32':
    dir_paths = [join(build_prefix, 'Scripts'),
                 join(cc.root_dir, 'Scripts'),
                 'C:\cygwin\bin']
else:
    dir_paths = [join(build_prefix, 'bin'),
                 join(cc.root_dir, 'bin'),]

dir_paths.extend(os.environ['PATH'].split(os.pathsep))

def find_executable(executable):
    for dir_path in dir_paths:
        if sys.platform == 'win32':
            for ext in  '.exe', '.bat', '':
                path = join(dir_path, executable + ext)
                if isfile(path):
                    return path
        else:
            path = join(dir_path, executable)
            if isfile(expanduser(path)):
                return path
    return None<commit_msg>Should return the expanded path<commit_after>from __future__ import print_function, division, absolute_import

import os
import sys
from os.path import isfile, join, expanduser

import conda.config as cc
from conda_build.config import build_prefix



if sys.platform == 'win32':
    dir_paths = [join(build_prefix, 'Scripts'),
                 join(cc.root_dir, 'Scripts'),
                 'C:\cygwin\bin']
else:
    dir_paths = [join(build_prefix, 'bin'),
                 join(cc.root_dir, 'bin'),]

dir_paths.extend(os.environ['PATH'].split(os.pathsep))

def find_executable(executable):
    for dir_path in dir_paths:
        if sys.platform == 'win32':
            for ext in  '.exe', '.bat', '':
                path = join(dir_path, executable + ext)
                if isfile(path):
                    return path
        else:
            path = join(dir_path, executable)
            if isfile(expanduser(path)):
                return expanduser(path)
    return None
{'fraction_non_alphanumeric': 0.10984455958549223, 'fraction_numerical': 0.004145077720207254, 'mean_word_length': 2.3121783876500857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2813848', 'n_tokens_mistral': 587, 'n_tokens_neox': 566, 'n_words': 147}