<commit_before>__author__ = "<NAME> <<EMAIL>>"
__date__ = "$Jun 26, 2014 18:24:25 EDT$"

<commit_msg>advanced_io: Added the function expand_pathname_list, which takes pathnames and uses regex to expand them into an explicit list of pathnames that match.<commit_after>__author__ = "<NAME> <<EMAIL>>"
__date__ = "$Jun 26, 2014 18:24:25 EDT$"


import glob

import advanced_debugging



# Get the logger
logger = advanced_debugging.logging.getLogger(__name__)



@advanced_debugging.log_call(logger)
def expand_pathname_list(*pathnames):
    """
        Takes each pathname in those given and expands them using regex.

        Args:
            *pathnames(str):     pathnames to use regex on to expand.

        Returns:
            list:                a list of path names (without regex)

    """

    expanded_pathnames = []

    # Completes any regex
    expanded_pathnames = []
    for each_pathname in pathnames:
        expanded_pathnames.extend(glob.glob(each_pathname))

    return(expanded_pathnames)
{'fraction_non_alphanumeric': 0.08919722497522299, 'fraction_numerical': 0.023785926660059464, 'mean_word_length': 3.3722943722943723, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4853905', 'n_tokens_mistral': 334, 'n_tokens_neox': 298, 'n_words': 91}