# Path: anchorhub/lib/bunch.py
# class Bunch(object):
#     """
#     Bunch - converts dictionaries into namespaces
#     """
#     def __init__(self, adict):
#         self.__dict__.update(adict)
# 
# Path: anchorhub/util/addsuffix.py
# def add_suffix(string, suffix):
#     """
#     Adds a suffix to a string, if the string does not already have that suffix.
# 
#     :param string: the string that should have a suffix added to it
#     :param suffix: the suffix to be added to the string
#     :return: the string with the suffix added, if it does not already end in
#         the suffix. Otherwise, it returns the original string.
#     """
#     if string[-len(suffix):] != suffix:
#         return string + suffix
#     else:
#         return string
# 
# Path: anchorhub/compatibility.py
# def get_path_separator():
#     """
#     Returns the appropriate file path separator depending on operating
#     system. That is, when run on UNIX-like systems it returns a forward slash
#     ('/'), and for Windows it returns a backslash ('\')
#     :return: String. The file path separator for the current operating system.
#     """
#     if os.name == 'nt':
#         return '\\'
#     else:
#         return '/'


import os.path as path
import re
from anchorhub.lib.bunch import Bunch
from anchorhub.util.addsuffix import add_suffix
from anchorhub.compatibility import get_path_separator
    portion.

    :param opts_dict: dictionary that will be modified
    """
    assert 'wrapper' in opts_dict
    opts_dict['open'], opts_dict['close'] = opts_dict['wrapper'].split()


def add_is_dir(opts_dict):
    """
    Checks to see if the input argument is a directory, and adds the key
    'is_dir' to opts_dict. The value is True if it is a directory,
    and False if it is not.

    :param opts_dict: Dictionary that will be modified
    """
    assert_has_input_output(opts_dict)
    opts_dict['is_dir'] = path.isdir(opts_dict['input'])


def ensure_directories_end_in_separator(opts_dict):
    """
    Adds a path separator to the end of the input and output directories,
    if they don't already have them.

    :param opts_dict: dictionary that will be modified
    """
    assert_has_input_output(opts_dict)
    assert 'is_dir' in opts_dict
    if opts_dict['is_dir']:

# Path: anchorhub/lib/bunch.py
# class Bunch(object):
#     """
#     Bunch - converts dictionaries into namespaces
#     """
#     def __init__(self, adict):
#         self.__dict__.update(adict)
# 
# Path: anchorhub/util/addsuffix.py
# def add_suffix(string, suffix):
#     """
#     Adds a suffix to a string, if the string does not already have that suffix.
# 
#     :param string: the string that should have a suffix added to it
#     :param suffix: the suffix to be added to the string
#     :return: the string with the suffix added, if it does not already end in
#         the suffix. Otherwise, it returns the original string.
#     """
#     if string[-len(suffix):] != suffix:
#         return string + suffix
#     else:
#         return string
# 
# Path: anchorhub/compatibility.py
# def get_path_separator():
#     """
#     Returns the appropriate file path separator depending on operating
#     system. That is, when run on UNIX-like systems it returns a forward slash
#     ('/'), and for Windows it returns a backslash ('\')
#     :return: String. The file path separator for the current operating system.
#     """
#     if os.name == 'nt':
#         return '\\'
#     else:
#         return '/'


# Path: anchorhub/normalization/normalize_opts.py
import os.path as path
import re
from anchorhub.lib.bunch import Bunch
from anchorhub.util.addsuffix import add_suffix
from anchorhub.compatibility import get_path_separator

    portion.

    :param opts_dict: dictionary that will be modified
    """
    assert 'wrapper' in opts_dict
    opts_dict['open'], opts_dict['close'] = opts_dict['wrapper'].split()


def add_is_dir(opts_dict):
    """
    Checks to see if the input argument is a directory, and adds the key
    'is_dir' to opts_dict. The value is True if it is a directory,
    and False if it is not.

    :param opts_dict: Dictionary that will be modified
    """
    assert_has_input_output(opts_dict)
    opts_dict['is_dir'] = path.isdir(opts_dict['input'])


def ensure_directories_end_in_separator(opts_dict):
    """
    Adds a path separator to the end of the input and output directories,
    if they don't already have them.

    :param opts_dict: dictionary that will be modified
    """
    assert_has_input_output(opts_dict)
    assert 'is_dir' in opts_dict
    if opts_dict['is_dir']:

        opts_dict['input'] = add_suffix(opts_dict['input'],