我想从 dbus 守护进程返回,如下所示:
>>> rule = {'name': 'torrent', 'port': '5892'}
>>> rule2 = {'name': 'amule', 'port': '234'}
>>> rules = []
>>> rules.append(rule)
>>> rules.append(rule2)
>>> rules
[{'name': 'torrent', 'port': '5892'}, {'name': 'amule', 'port': '234'}]
我正在尝试这个:
out_signature='a{ss}'
但我收到了这个错误:
TypeError: list indices must be integers, not dict
我要使用哪个 out_signature?提前致谢!!!