src/aoikhotkeydep/aoikimportutil.py
def import_module_by_code(mod_code, mod_name, sys_add=True, sys_use=True):
    """Create a module object by code.
    @param mod_code: the code that the module contains.

    @param mod_name: module name.

    @param sys_use: whether use an existing module with the same name in
    |sys.modules|,
     instead of creating a new one.

    @param sys_add: whether add the module object to |sys.modules|.
    If |sys_add| is on, |mod_name| is used as key to |sys.modules|.

    If |sys_add| is on, and if |mod_name| is |a.b.c| while modules
     |a| and |a.b| are not existing, empty modules will be created
     for |a| and |a.b| as well.
    """
    #
    mod_obj_old = sys.modules.get(mod_name, None)

    #
    if mod_obj_old is not None and sys_use:
        return mod_obj_old

    #
    mod_obj = imp.new_module(mod_name)

    # 3plQeic
    exec_(mod_code, mod_obj.__dict__, mod_obj.__dict__)

    #
    if sys_add:
        #
        add_to_sys_modules(mod_name=mod_name, mod_obj=mod_obj)

    #
    return mod_obj
Create a module object by code.
    @param mod_code: the code that the module contains.

    @param mod_name: module name.

    @param sys_use: whether use an existing module with the same name in
    |sys.modules|,
     instead of creating a new one.

    @param sys_add: whether add the module object to |sys.modules|.
    If |sys_add| is on, |mod_name| is used as key to |sys.modules|.

    If |sys_add| is on, and if |mod_name| is |a.b.c| while modules
     |a| and |a.b| are not existing, empty modules will be created
     for |a| and |a.b| as well.
    
Create a module object by code.
Create a module object by code .
def import_module_by_code(mod_code, mod_name, sys_add=True, sys_use=True):
    mod_obj_old = sys.modules.get(mod_name, None)
    if mod_obj_old is not None and sys_use:
        return mod_obj_old
    mod_obj = imp.new_module(mod_name)
     3plQeic
    exec_(mod_code, mod_obj.__dict__, mod_obj.__dict__)
    if sys_add:
        add_to_sys_modules(mod_name=mod_name, mod_obj=mod_obj)
    return mod_obj
def import_module_by_code ( mod_code , mod_name , sys_add = True , sys_use = True ) : mod_obj_old = sys . modules . get ( mod_name , None ) if mod_obj_old is not None and sys_use : return mod_obj_old mod_obj = imp . new_module ( mod_name ) exec_ ( mod_code , mod_obj . __dict__ , mod_obj . __dict__ ) if sys_add : add_to_sys_modules ( mod_name = mod_name , mod_obj = mod_obj ) return mod_obj
Create a module object by code.
Create a module object by code .
"""Create a module object by code.
    @param mod_code: the code that the module contains.

    @param mod_name: module name.

    @param sys_use: whether use an existing module with the same name in
    |sys.modules|,
     instead of creating a new one.

    @param sys_add: whether add the module object to |sys.modules|.
    If |sys_add| is on, |mod_name| is used as key to |sys.modules|.

    If |sys_add| is on, and if |mod_name| is |a.b.c| while modules
     |a| and |a.b| are not existing, empty modules will be created
     for |a| and |a.b| as well.
    """ # # # # 3plQeic # # #
mod_code
the code that the module contains.
the code that the module contains .
mod_name
None
sys_add
whether add the module object to |sys.modules|.
If |sys_add| is on, |mod_name| is used as key to |sys.modules|.

If |sys_add| is on, and if |mod_name| is |a.b.c| while modules
|a| and |a.b| are not existing, empty modules will be created
for |a| and |a.b| as well.
whether add the module object to |sys . modules| . If |sys_add| is on |mod_name| is used as key to |sys . modules| . If |sys_add| is on and if |mod_name| is |a . b . c| while modules |a| and |a . b| are not existing empty modules will be created for |a| and |a . b| as well .
sys_use
whether use an existing module with the same name in
|sys.modules|,
instead of creating a new one.
whether use an existing module with the same name in |sys . modules| instead of creating a new one .