# Path: shapy/framework/executor.py
# def run(command, **kwargs):
# def get_command(name, **kwargs):
#     def __init__(self, **kwargs):
#     def __setitem__(self, key, item):
#     def __getitem__(self, key):
#     def cmd(self):
#     def get(self):
#     def get_context(self):
#     def get_interface(self):
#     def execute(self):
# class Executable(object):
# 
# Path: shapy/framework/utils.py
# def validate_ip(addr):
# def validate_full_ip(ip):
# def align(l, alignto=4):
# def convert_handle(handle):
# def get_if_index(if_name):
# def nl_us2ticks(delay):
# def nl_ticks2us(ticks):
# def convert_to_bytes(rate):
#     def register(cls, interpreter, content_types):
#     def select(cls, selector):
# class InterpreterMixin(object):


import logging
from shapy.framework import executor, utils
logger = logging.getLogger('shapy.framework.interface')


class Interface(object):
    interfaces = {}
    
    def __new__(cls, name):
        if Interface.interfaces.has_key(name):
            return Interface.interfaces[name]
        instance = super(Interface, cls).__new__(cls)

# Path: shapy/framework/executor.py
# def run(command, **kwargs):
# def get_command(name, **kwargs):
#     def __init__(self, **kwargs):
#     def __setitem__(self, key, item):
#     def __getitem__(self, key):
#     def cmd(self):
#     def get(self):
#     def get_context(self):
#     def get_interface(self):
#     def execute(self):
# class Executable(object):
# 
# Path: shapy/framework/utils.py
# def validate_ip(addr):
# def validate_full_ip(ip):
# def align(l, alignto=4):
# def convert_handle(handle):
# def get_if_index(if_name):
# def nl_us2ticks(delay):
# def nl_ticks2us(ticks):
# def convert_to_bytes(rate):
#     def register(cls, interpreter, content_types):
#     def select(cls, selector):
# class InterpreterMixin(object):


# Path: shapy/framework/interface.py
import logging
from shapy.framework import executor, utils

logger = logging.getLogger('shapy.framework.interface')


class Interface(object):
    interfaces = {}
    
    def __new__(cls, name):
        if Interface.interfaces.has_key(name):
            return Interface.interfaces[name]
        instance = super(Interface, cls).__new__(cls)

        Interface.interfaces.update({name: instance})