All pastes #734693 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-12 22:36 UTC
rendered paste body
def t(x):
    physicals = []
    free = [] 
    total = []
    type = []
    for child in x.findall('Drive'):
        free.append(child.findall('Free_bytes'))
        total.append(child.findall('Total_bytes'))
        type.append(child.findall('Drive_type'))
    pairs = zip([e[0].text for e in free],[f[0].text for f in total])
    i = 0
    for p in pairs:
        if type[i][0].text == '3':
            physicals.append(p)
        i += 1
    return { "Free Space": physicals}