Get-targets.gmp.py

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
import sys
res = gmp.get_targets()
for i, target in enumerate(res.xpath('target')):
    id = target.xpath('@id')[0]
    name = target.xpath('name/text()')[0]
    print('\n({0}) {1}: ({2})'.format(i, name, id))