新手问题。我希望能做如下的事情:
import boto
from boto.iam.connection import IAMConnection
cfn = IAMConnection()
cfn.get_all_users()
for user in userList:
print user.user_id
连接工作正常,但最后一行返回错误“'unicode'object has no attribute'user'u id'”。在
我做了一个type(userList)
,它将类型报告为<;class'boto.jsonresponse.Element'>;,它不显示(?)待记录。使用普通的JSON解析似乎也不起作用。在
从another source来看,意图似乎是这样一个操作的结果,应该被“pythonized”
不管怎样,我对boto还是个新手,所以我想有一些简单的方法可以做到这一点,我只是没有偶然发现过。在
谢谢!在
如果您希望输出由学生姓名
A
与标记2.10
和10.2
之间的链接组成,则需要Map<String, List<Mark>>
输出或使用当前的List<Student
输出,该输出根据需要进行排序:输出为
List<Student>
:如果您觉得
Map<String, List<Mark>>
更合适,那么请注意对键进行排序的TreeMap
实现:相关问题 更多 >
编程相关推荐