Multiple fixes to ev and utils:
Made utils.variable_from_module more generic (it can now load pretty much any form of module it's given and also supports searching and returning multiple variables). Removed the variable-load functionality from utils.load_module; this is now purely a loader - use variable_from_module instead. I found out that one couldn't import from src.commands.default due to the __init__ file being restrictive for the sake of the ev API. Removed that and instead imported the default commands into ev.py with the help of utils.variable_from_module instead. Some more fixes in ev followed on this.
This commit is contained in:
parent
3306e36d82
commit
4678234e9a
11 changed files with 211 additions and 188 deletions
|
|
@ -28,12 +28,12 @@ from src.commands.cmdsethandler import CmdSetHandler
|
|||
from src.commands import cmdhandler
|
||||
from src.scripts.scripthandler import ScriptHandler
|
||||
from src.utils import logger
|
||||
from src.utils.utils import make_iter, to_unicode, mod_import
|
||||
from src.utils.utils import make_iter, to_unicode, variable_from_module
|
||||
|
||||
#__all__ = ("ObjAttribute", "Alias", "ObjectNick", "ObjectDB")
|
||||
|
||||
|
||||
_AT_SEARCH_RESULT = mod_import(*settings.SEARCH_AT_RESULT.rsplit('.', 1))
|
||||
_AT_SEARCH_RESULT = variable_from_module(*settings.SEARCH_AT_RESULT.rsplit('.', 1))
|
||||
|
||||
_GA = object.__getattribute__
|
||||
_SA = object.__setattr__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue