# Path: e3d/_baseManager.py
# class BaseManager(object):
#     def __init__(self):
#         self._engine = None
# 
#     def initialize(self, engine):
#         self._engine = engine
# 
#     def terminate(self):
#         pass
# 
# Path: e3d/plugin_management/PluginHandlers.py
# class PluginDescription(object):
#     def __init__(self, name='', description='', authorName='', authorEmail=''):
#         self.name = name
#         self.description = description
#         self.authorName = authorName
#         self.authorEmail = authorEmail
# 
#     def __repr__(self):
#         return self.name
# 
#     def _toDict(self):
#         d = dir(self)
#         dd = {v: getattr(self, v) for v in d if not v.startswith('_') and not callable(getattr(self, v))}
#         return dd
# 
#     def saveToDisk(self, destFolder):
#         try:
#             finalPath = path.abspath(path.join(destFolder, DESCRIPTIONNAME + '.json'))
#             with open(finalPath, 'w') as dest:
#                 dump(self._toDict(), dest, indent=4)
#         except:
#             raise
# 
#     @staticmethod
#     def fromDisk(folderPath):
#         descriptionPath = path.abspath(path.join(folderPath, DESCRIPTIONNAME + '.json'))
#         if not path.exists(descriptionPath):
#             raise FileNotFoundError('required plugin description file not found.')
#         with open(descriptionPath) as desc:
#             data = load(desc)
# 
#         description = PluginDescription(**data)
#         return description
# 
# class _Plugin(object):
#     def __init__(self, description, mainClass, pluginPath):
#         self.description = description
#         self.mainClass = mainClass
#         self.pluginPath = pluginPath
# 
# Path: e3d/plugin_management/RunnableClass.py
# MAINFILENAME = 'main.py'
# 
# MAINCLASSNAME = 'MAIN'
# 
# class Runnable(object):
#     def __init__(self, engine):
#         self.engine = engine
#         self.repiteCurrentPass = False
# 
#     def preparePlugin(self, data):
#         pass
# 
#     def onDrawPass(self, passNumber):
#         pass
# 
#     def onPreUpdate(self):
#         pass
# 
#     def onPostUpdate(self):
#         pass
# 
#     def terminate(self):
#         pass


from .._baseManager import BaseManager
from .PluginHandlers import PluginDescription, _Plugin
from .RunnableClass import MAINFILENAME, MAINCLASSNAME, Runnable
from sys import version_info
from os import path
from shutil import rmtree
from tempfile import mkdtemp
    from shutil import unpack_archive
        from importlib.machinery import SourceFileLoader
        from importlib import util
    import imp
        filename extension and see if an unpacker was registered for that
        extension.

        In case none is found, a ValueError is raised.
        """
        if extract_dir is None:
            extract_dir = os.getcwd()

        if format is not None:
            try:
                format_info = _UNPACK_FORMATS[format]
            except KeyError:
                raise ValueError("Unknown unpack format '{0}'".format(format))

            func = format_info[1]
            func(filename, extract_dir, **dict(format_info[2]))
        else:
            # we need to look at the registered unpackers supported extensions
            format = _find_unpack_format(filename)
            if format is None:
                raise ReadError("Unknown archive format '{0}'".format(filename))

            func = _UNPACK_FORMATS[format][1]
            kwargs = dict(_UNPACK_FORMATS[format][2])
            func(filename, extract_dir, **kwargs)
else:
    if version_info[1] < 5:
    else:



# Path: e3d/_baseManager.py
# class BaseManager(object):
#     def __init__(self):
#         self._engine = None
# 
#     def initialize(self, engine):
#         self._engine = engine
# 
#     def terminate(self):
#         pass
# 
# Path: e3d/plugin_management/PluginHandlers.py
# class PluginDescription(object):
#     def __init__(self, name='', description='', authorName='', authorEmail=''):
#         self.name = name
#         self.description = description
#         self.authorName = authorName
#         self.authorEmail = authorEmail
# 
#     def __repr__(self):
#         return self.name
# 
#     def _toDict(self):
#         d = dir(self)
#         dd = {v: getattr(self, v) for v in d if not v.startswith('_') and not callable(getattr(self, v))}
#         return dd
# 
#     def saveToDisk(self, destFolder):
#         try:
#             finalPath = path.abspath(path.join(destFolder, DESCRIPTIONNAME + '.json'))
#             with open(finalPath, 'w') as dest:
#                 dump(self._toDict(), dest, indent=4)
#         except:
#             raise
# 
#     @staticmethod
#     def fromDisk(folderPath):
#         descriptionPath = path.abspath(path.join(folderPath, DESCRIPTIONNAME + '.json'))
#         if not path.exists(descriptionPath):
#             raise FileNotFoundError('required plugin description file not found.')
#         with open(descriptionPath) as desc:
#             data = load(desc)
# 
#         description = PluginDescription(**data)
#         return description
# 
# class _Plugin(object):
#     def __init__(self, description, mainClass, pluginPath):
#         self.description = description
#         self.mainClass = mainClass
#         self.pluginPath = pluginPath
# 
# Path: e3d/plugin_management/RunnableClass.py
# MAINFILENAME = 'main.py'
# 
# MAINCLASSNAME = 'MAIN'
# 
# class Runnable(object):
#     def __init__(self, engine):
#         self.engine = engine
#         self.repiteCurrentPass = False
# 
#     def preparePlugin(self, data):
#         pass
# 
#     def onDrawPass(self, passNumber):
#         pass
# 
#     def onPreUpdate(self):
#         pass
# 
#     def onPostUpdate(self):
#         pass
# 
#     def terminate(self):
#         pass


# Path: e3d/plugin_management/PluginsManagerClass.py
from .._baseManager import BaseManager
from .PluginHandlers import PluginDescription, _Plugin
from .RunnableClass import MAINFILENAME, MAINCLASSNAME, Runnable
from sys import version_info
from os import path
from shutil import rmtree
from tempfile import mkdtemp
    from shutil import unpack_archive
        from importlib.machinery import SourceFileLoader
        from importlib import util
    import imp

        filename extension and see if an unpacker was registered for that
        extension.

        In case none is found, a ValueError is raised.
        """
        if extract_dir is None:
            extract_dir = os.getcwd()

        if format is not None:
            try:
                format_info = _UNPACK_FORMATS[format]
            except KeyError:
                raise ValueError("Unknown unpack format '{0}'".format(format))

            func = format_info[1]
            func(filename, extract_dir, **dict(format_info[2]))
        else:
            # we need to look at the registered unpackers supported extensions
            format = _find_unpack_format(filename)
            if format is None:
                raise ReadError("Unknown archive format '{0}'".format(filename))

            func = _UNPACK_FORMATS[format][1]
            kwargs = dict(_UNPACK_FORMATS[format][2])
            func(filename, extract_dir, **kwargs)
else:
    if version_info[1] < 5:
    else:



class PluginsManager(BaseManager):