def send_command(self, callback: Callable, **data: Any) -> None:
"""Send the given command that should be handled bu the given callback
"""
data['uid'] = self.add_callback(callback)
try:
self.push(
bytes('{}\r\n'.format(sublime.encode_value(data)), 'utf8')
)
except NameError:
self.push(bytes('{}\r\n'.format(json.dumps(data)), 'utf8'))
评论列表
文章目录