<commit_before>########################################################################
#
#       License: BSD
#       Created: October 1, 2002
#       Author:  <NAME> - <EMAIL>
#
#       $Id$
#
########################################################################

"""
PyTables, hierarchical datasets in Python

:URL: http://www.pytables.org/

PyTables is a package for managing hierarchical datasets and designed
to efficiently cope with extremely large amounts of data.

Most Important Classes
======================

Nodes
~~~~~

Group, Table, Array, CArray, EArray, VLArray, UnImplemented

Declarative
~~~~~~~~~~~

IsDescription, {Type}Atom, {Type}Col

Helpers
~~~~~~~

File, Filters, Cols, Column


First Level Functions
=====================

openFile, copyFile, test,  print_versions, whichLibVersion,
isPyTablesFile, isHDF5File

Misc variables
==============

__version__, hdf5Version, is_pro

"""

import sys, os
if os.name == 'nt':
    module_path = os.path.abspath(os.path.dirname(__file__))
    os.environ['PATH'] = ';'.join((os.environ['PATH'], module_path))
    sys.path.append(module_path)


# Necessary imports to get versions stored on the Pyrex extension
from tables.utilsExtension import getPyTablesVersion, getHDF5Version
<commit_msg>Add explicit testing for hdf5dll.dll on Windows to improve diagnostics<commit_after>########################################################################
#
#       License: BSD
#       Created: October 1, 2002
#       Author:  <NAME> - <EMAIL>
#
#       $Id$
#
########################################################################

"""
PyTables, hierarchical datasets in Python

:URL: http://www.pytables.org/

PyTables is a package for managing hierarchical datasets and designed
to efficiently cope with extremely large amounts of data.

Most Important Classes
======================

Nodes
~~~~~

Group, Table, Array, CArray, EArray, VLArray, UnImplemented

Declarative
~~~~~~~~~~~

IsDescription, {Type}Atom, {Type}Col

Helpers
~~~~~~~

File, Filters, Cols, Column


First Level Functions
=====================

openFile, copyFile, test,  print_versions, whichLibVersion,
isPyTablesFile, isHDF5File

Misc variables
==============

__version__, hdf5Version, is_pro

"""

import sys, os
if os.name == 'nt':
    module_path = os.path.abspath(os.path.dirname(__file__))
    os.environ['PATH'] = ';'.join((os.environ['PATH'], module_path))
    sys.path.append(module_path)

# In order to improve diagnosis of a common Windows dependency
# issue, we explicitly test that we can load the HDF5 dll before
# loading tables.utilsExtensions.
if os.name == 'nt':
    import ctypes
    from ctypes import wintypes
    LoadLibrary = ctypes.windll.kernel32.LoadLibraryW
    LoadLibrary.argtypes = [ctypes.c_wchar_p]
    LoadLibrary.restype = wintypes.HANDLE
    FreeLibrary = ctypes.windll.kernel32.FreeLibrary
    FreeLibrary.argtypes = [wintypes.HANDLE]
    FreeLibrary.restype = wintypes.BOOL

    handle = LoadLibrary('hdf5dll.dll')
    if handle == 0:
        raise ImportError('Could not load "hdf5dll.dll", please ensure' +
                ' that it can be found in the system path')
    FreeLibrary(handle)


# Necessary imports to get versions stored on the Pyrex extension
from tables.utilsExtension import getPyTablesVersion, getHDF5Version


{'fraction_non_alphanumeric': 0.21566848154869933, 'fraction_numerical': 0.007562008469449486, 'mean_word_length': 4.781468531468532, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3054521', 'n_tokens_mistral': 993, 'n_tokens_neox': 928, 'n_words': 274}