# Path: nappingcat/util.py
# def _resolve_name(name, package, level):
# def import_class_from_module(name):
# 
# Path: nappingcat/exceptions.py
# class NappingCatUnhandled(NappingCatException):
#     pass
# 
# class NappingCatBadPatterns(NappingCatBadConfig):
#     pass


from nappingcat.util import import_module 
from nappingcat.exceptions import NappingCatUnhandled, NappingCatBadPatterns
import re

class CommandPatterns(object):
    def __init__(self, path, map):
        self.path, self.map = path, map
        if self.path:
            self.module = import_module(self.path)

    def match(self, command):

# Path: nappingcat/util.py
# def _resolve_name(name, package, level):
# def import_class_from_module(name):
# 
# Path: nappingcat/exceptions.py
# class NappingCatUnhandled(NappingCatException):
#     pass
# 
# class NappingCatBadPatterns(NappingCatBadConfig):
#     pass


# Path: nappingcat/patterns.py
from nappingcat.util import import_module 
from nappingcat.exceptions import NappingCatUnhandled, NappingCatBadPatterns
import re


class CommandPatterns(object):
    def __init__(self, path, map):
        self.path, self.map = path, map
        if self.path:
            self.module = import_module(self.path)

    def match(self, command):

        for regex, target in self.map: