脚本:
def showdict(outinfo):
for line in outinfo:
print(str(line)+":"+str(outinfo.get(line, 'NA')))
showdict(outinfo)
输出:
#instance_uuid:84f43473-8d26-43b1-b9e8-0b9bc58b5b22
#vendor:VMware, Inc.
#locale_version:INTL
#license_product_name:VMware VirtualCenter Server
10-04 18:18