Import modules from package and append into sys.modules

    :param package: full package name, e.g. east.asts

def import_modules_from_package(package):
    """Import modules from package and append into sys.modules

    :param package: full package name, e.g. east.asts
    """
    path = [os.path.dirname(__file__), '..'] + package.split('.')
    path = os.path.join(*path)
    for root, dirs, files in os.walk(path):
        for filename in files:
            if filename.startswith('__') or not filename.endswith('.py'):
                continue
            new_package = ".".join(root.split(os.sep)).split("....")[1]
            module_name = '%s.%s' % (new_package, filename[:-3])
            if module_name not in sys.modules:
                __import__(module_name)