<commit_before>python-glob2
============

This is an extended version of Python's builtin glob module
(http://docs.python.org/library/glob.html) which adds:

- The ability to capture the text matched by glob patterns, and
  return those matches alongside the filenames.

- A recursive '**' globbing syntax, akin for example to the ``globstar``
  option of the bash shell.

- The ability to replace the filesystem functions used, in order to glob
  on virtual filesystems.


Examples
--------

Matches being returned:
~~~~~~~~~~~~~~~~~~~~~~~

::

    import glob2

    for filename, (version,) in glob2.iglob('./binaries/project-*.zip', with_matches=True):
        print version


Recursive glob:
~~~~~~~~~~~~~~~

::

    >>> import glob2
    >>> all_header_files = glob2.glob('src/**/*.h')
    ['src/fs.h', 'src/media/mp3.h', 'src/media/mp3/frame.h', ...]

<commit_msg>Promote Python 3 compatibility.<commit_after>python-glob2
============

This is an extended version of Python's builtin glob module
(http://docs.python.org/library/glob.html) which adds:

- The ability to capture the text matched by glob patterns, and
  return those matches alongside the filenames.

- A recursive '**' globbing syntax, akin for example to the ``globstar``
  option of the bash shell.

- The ability to replace the filesystem functions used, in order to glob
  on virtual filesystems.

- Compatible with Python 2 and Python 3 (tested with 3.3).


Examples
--------

Matches being returned:
~~~~~~~~~~~~~~~~~~~~~~~

::

    import glob2

    for filename, (version,) in glob2.iglob('./binaries/project-*.zip', with_matches=True):
        print version


Recursive glob:
~~~~~~~~~~~~~~~

::

    >>> import glob2
    >>> all_header_files = glob2.glob('src/**/*.h')
    ['src/fs.h', 'src/media/mp3.h', 'src/media/mp3/frame.h', ...]


{'fraction_non_alphanumeric': 0.1751101321585903, 'fraction_numerical': 0.010462555066079295, 'mean_word_length': 3.5199004975124377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2160712', 'n_tokens_mistral': 577, 'n_tokens_neox': 535, 'n_words': 181}