summaryrefslogtreecommitdiffstats
path: root/doc/examples/print_uris.py
blob: 1b59e002f2decde3a9fae60dfc2e274374aab408 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/python3
#
# a example that prints the URIs of all upgradable packages
#

import apt

for pkg in apt.Cache():
    if pkg.is_upgradable:
        print(pkg.candidate.uri)