def send_command(self, command):
        if not self.attachment_status == apiAttachSuccess:
            self.attach(command.Timeout)
        self.push_command(command)
        self.notifier.sending_command(command)
        cmd = u'#%d %s' % (command.Id, command.Command)
        if command.Blocking:
            if self.run_main_loop:
                command._event = event = threading.Event()
            else:
                command._loop = EventLoop()
        else:
            command._timer = timer = threading.Timer(command.timeout2float(), self.pop_command, (command.Id,))

        self.logger.debug('sending %s', repr(cmd))
        userInfo = CFDictionary({CFString('SKYPE_API_COMMAND'): CFString(cmd),
                                 CFString('SKYPE_API_CLIENT_ID'): CFNumber(self.client_id)})
        self.post('SKSkypeAPICommand', userInfo)

        if command.Blocking:
            if self.run_main_loop:
                event.wait(command.timeout2float())
                if not event.isSet():
                    raise SkypeAPIError('Skype command timeout')
            else:
                if not EventLoop.run(command.timeout2float()):
                    raise SkypeAPIError('Skype command timeout')
        else:
            timer.start()
dataset/ETHPy150Open Skype4Py/Skype4Py/Skype4Py/api/darwin.py/SkypeAPI.send_command/original