# Path: findatapy/util/loggermanager.py
# class LoggerManager(object):
#     """Acts as a wrapper for logging.
# 
#     """
#     __metaclass__ = Singleton
# 
#     _loggers = {}
# 
#     def __init__(self, *args, **kwargs):
#         pass
# 
#     @staticmethod
#     def getLogger(name=None):
#         if not name:
#             try:
#                 logging.config.fileConfig(DataConstants().logging_conf)
#             except: pass
# 
#             log = logging.getLogger();
#         elif name not in LoggerManager._loggers.keys():
#             try:
#                 logging.config.fileConfig(DataConstants().logging_conf)
#             except: pass
# 
#             LoggerManager._loggers[name] = logging.getLogger(str(name))
# 
#         log = LoggerManager._loggers[name]
# 
#         # when recalling appears to make other loggers disabled
#         # hence apply this hack!
#         for name in LoggerManager._loggers.keys():
#             LoggerManager._loggers[name].disabled = False
# 
#         return log


from findatapy.util.loggermanager import LoggerManager
            return cross, 'USDUSD'

        return base + 'USD', 'USD' + terms

    def correct_notation(self, cross):
        base = cross[0:3]
        terms = cross[3:6]

        try:
            base_index = self.order.index(base)
        except ValueError:
            base_index = -1

        try:
            terms_index = self.order.index(terms)
        except ValueError:
            terms_index = -1

        if (base_index < 0 and terms_index > 0):
            return terms + base
        if (base_index > 0 and terms_index < 0):
            return base + terms
        elif (base_index > terms_index):
            return terms + base
        elif (terms_index > base_index):
            return base + terms

        return cross

if __name__ == '__main__':

# Path: findatapy/util/loggermanager.py
# class LoggerManager(object):
#     """Acts as a wrapper for logging.
# 
#     """
#     __metaclass__ = Singleton
# 
#     _loggers = {}
# 
#     def __init__(self, *args, **kwargs):
#         pass
# 
#     @staticmethod
#     def getLogger(name=None):
#         if not name:
#             try:
#                 logging.config.fileConfig(DataConstants().logging_conf)
#             except: pass
# 
#             log = logging.getLogger();
#         elif name not in LoggerManager._loggers.keys():
#             try:
#                 logging.config.fileConfig(DataConstants().logging_conf)
#             except: pass
# 
#             LoggerManager._loggers[name] = logging.getLogger(str(name))
# 
#         log = LoggerManager._loggers[name]
# 
#         # when recalling appears to make other loggers disabled
#         # hence apply this hack!
#         for name in LoggerManager._loggers.keys():
#             LoggerManager._loggers[name].disabled = False
# 
#         return log


# Path: findatapy/util/fxconv.py
from findatapy.util.loggermanager import LoggerManager

            return cross, 'USDUSD'

        return base + 'USD', 'USD' + terms

    def correct_notation(self, cross):
        base = cross[0:3]
        terms = cross[3:6]

        try:
            base_index = self.order.index(base)
        except ValueError:
            base_index = -1

        try:
            terms_index = self.order.index(terms)
        except ValueError:
            terms_index = -1

        if (base_index < 0 and terms_index > 0):
            return terms + base
        if (base_index > 0 and terms_index < 0):
            return base + terms
        elif (base_index > terms_index):
            return terms + base
        elif (terms_index > base_index):
            return base + terms

        return cross

if __name__ == '__main__':

    logger = LoggerManager.getLogger(__name__)