def _inject_globals(self):
    '\n        Inject some Python objects and functions into the Lua global scope _G\n\n        :return: None\n        '
    injector = self.lua.eval('\n            function (key, value)\n                _G[key] = value\n            end\n        ')

    def log(message):
        '\n            Pass a message from Lua to the Python logger\n\n            :param message: The message text\n            :return: None\n            '
        self.logger.debug((u'Lua: ' + str(message)))

    def interval(seconds, function):
        i = Interval(seconds, function, self.lua)
        self.timers.append(i)
        return i

    def delayed(seconds, function):
        i = Delayed(seconds, function, self.lua)
        self.timers.append(i)
        return i

    def simple_com(text, user, args):
        params = []
        if args:
            for key in args:
                if (key != 'n'):
                    params.append(args[key])
        try:
            response = text.format(*params, user=user)
        except IndexError:
            response = (user + u', invalid number of arguments.')
        return response
    injector('log', log)
    injector('datasource', self.datasource)
    injector('human_readable_time', human_readable_time)
    injector('settings', self.settings)
    injector('Chat', self.chat)
    injector('Http', Http())
    injector('TupleData', TupleData)
    injector('Interval', interval)
    injector('Delayed', delayed)
    injector('SimpleCom', simple_com)
Inject some Python objects and functions into the Lua global scope _G

:return: None
def _inject_globals(self):
    '\n        Inject some Python objects and functions into the Lua global scope _G\n\n        :return: None\n        '
    injector = self.lua.eval('\n            function (key, value)\n                _G[key] = value\n            end\n        ')

    def log(message):
        '\n            Pass a message from Lua to the Python logger\n\n            :param message: The message text\n            :return: None\n            '
        self.logger.debug((u'Lua: ' + str(message)))

    def interval(seconds, function):
        i = Interval(seconds, function, self.lua)
        self.timers.append(i)
        return i

    def delayed(seconds, function):
        i = Delayed(seconds, function, self.lua)
        self.timers.append(i)
        return i

    def simple_com(text, user, args):
        params = []
        if args:
            for key in args:
                if (key != 'n'):
                    params.append(args[key])
        try:
            response = text.format(*params, user=user)
        except IndexError:
            response = (user + u', invalid number of arguments.')
        return response
    injector('log', log)
    injector('datasource', self.datasource)
    injector('human_readable_time', human_readable_time)
    injector('settings', self.settings)
    injector('Chat', self.chat)
    injector('Http', Http())
    injector('TupleData', TupleData)
    injector('Interval', interval)
    injector('Delayed', delayed)
    injector('SimpleCom', simple_com)