summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-02-23 15:57:52 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-02-23 15:57:52 +0000
commit8bd15f69297702d22bd4dc958f2a0eb221b8e6f9 (patch)
tree627f92699eec4a7dcb74089f43ac07aaf3c198de /doc
parentc17e7730c128ea465d0e9581a2f87a4e0c4869d3 (diff)
downloadpython-apt-8bd15f69297702d22bd4dc958f2a0eb221b8e6f9.tar.gz
* progress callback support added
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/depcache.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/examples/depcache.py b/doc/examples/depcache.py
index 17dbf147..b3d720a5 100644
--- a/doc/examples/depcache.py
+++ b/doc/examples/depcache.py
@@ -3,6 +3,9 @@
import apt_pkg
+def Update(Percent, data):
+ pass
+
apt_pkg.init()
cache = apt_pkg.GetCache()
print cache.PackageCount
@@ -11,6 +14,7 @@ iter = cache["base-config"]
print iter
depcache = apt_pkg.GetDepCache(cache)
+depcache.SetProgressCallback(Update, None)
depcache.Init()
print depcache
print depcache.InstCount