45 lines
975 B
Python
45 lines
975 B
Python
|
# Twisted/Klein imports
|
||
|
from twisted.logger import Logger
|
||
|
|
||
|
# Other library imports
|
||
|
# import requests
|
||
|
# from json import dumps
|
||
|
|
||
|
# Project imports
|
||
|
# from settings import settings
|
||
|
import util
|
||
|
|
||
|
import ux.irc
|
||
|
import ux.commands
|
||
|
import ux.notify
|
||
|
|
||
|
|
||
|
class UX(object):
|
||
|
"""
|
||
|
Class to manage calls to various user interfaces.
|
||
|
"""
|
||
|
|
||
|
def __init__(self):
|
||
|
self.log = Logger("ux")
|
||
|
|
||
|
self.irc = ux.irc.bot()
|
||
|
self.notify = ux.notify.Notify()
|
||
|
|
||
|
def __xmerged__(self):
|
||
|
"""
|
||
|
Called when xmerge has been completed in the webapp.
|
||
|
Merge all instances into child classes.
|
||
|
"""
|
||
|
init_map = {
|
||
|
"ux": self,
|
||
|
"agora": self.agora,
|
||
|
"markets": self.markets,
|
||
|
"sinks": self.sinks,
|
||
|
"tx": self.tx,
|
||
|
"webapp": self.webapp,
|
||
|
"money": self.money,
|
||
|
"irc": self.irc,
|
||
|
"notify": self.notify,
|
||
|
}
|
||
|
util.xmerge_attrs(init_map)
|