utils package
=============

.. automodule:: brian2.utils
    :show-inheritance:


:mod:`arrays` module
--------------------

.. automodule:: brian2.utils.arrays
    :show-inheritance:

**Functions**

.. autosummary:: calc_repeats
    :toctree:


:mod:`caching` module
---------------------

.. automodule:: brian2.utils.caching
    :show-inheritance:

**Classes**

.. autosummary:: CacheKey
    :toctree:

**Functions**

.. autosummary:: cached
    :toctree:


:mod:`environment` module
-------------------------

.. automodule:: brian2.utils.environment
    :show-inheritance:

**Functions**

.. autosummary:: running_from_ipython
    :toctree:


:mod:`filelock` module
----------------------

.. automodule:: brian2.utils.filelock
    :show-inheritance:

**Classes**

.. autosummary:: BaseFileLock
    :toctree:

.. autosummary:: FileLock
    :toctree:

.. autosummary:: SoftFileLock
    :toctree:

.. autosummary:: Timeout
    :toctree:

.. autosummary:: UnixFileLock
    :toctree:

.. autosummary:: WindowsFileLock
    :toctree:

**Functions**

.. autosummary:: logger
    :toctree:


:mod:`filetools` module
-----------------------

.. automodule:: brian2.utils.filetools
    :show-inheritance:

**Classes**

.. autosummary:: in_directory
    :toctree:

**Functions**

.. autosummary:: copy_directory
    :toctree:

.. autosummary:: ensure_directory
    :toctree:

.. autosummary:: ensure_directory_of_file
    :toctree:


:mod:`logger` module
--------------------

.. automodule:: brian2.utils.logger
    :show-inheritance:

**Classes**

.. autosummary:: BrianLogger
    :toctree:

.. autosummary:: HierarchyFilter
    :toctree:

.. autosummary:: LogCapture
    :toctree:

.. autosummary:: NameFilter
    :toctree:

.. autosummary:: RemoveBrian2Filter
    :toctree:

.. autosummary:: catch_logs
    :toctree:

.. autosummary:: std_silent
    :toctree:

**Functions**

.. autosummary:: brian_excepthook
    :toctree:

.. autosummary:: clean_up_logging
    :toctree:

.. autosummary:: get_logger
    :toctree:

.. autosummary:: log_level_validator
    :toctree:


:mod:`stringtools` module
-------------------------

.. automodule:: brian2.utils.stringtools
    :show-inheritance:

**Classes**

.. autosummary:: SpellChecker
    :toctree:

**Functions**

.. autosummary:: code_representation
    :toctree:

.. autosummary:: deindent
    :toctree:

.. autosummary:: get_identifiers
    :toctree:

.. autosummary:: indent
    :toctree:

.. autosummary:: replace
    :toctree:

.. autosummary:: strip_empty_leading_and_trailing_lines
    :toctree:

.. autosummary:: strip_empty_lines
    :toctree:

.. autosummary:: stripped_deindented_lines
    :toctree:

.. autosummary:: word_substitute
    :toctree:


:mod:`topsort` module
---------------------

.. automodule:: brian2.utils.topsort
    :show-inheritance:

**Functions**

.. autosummary:: topsort
    :toctree:


