summaryrefslogtreecommitdiff
path: root/doc/examples/cdrom.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-04-11 14:19:44 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-04-11 14:19:44 +0000
commita8074615c2bac880bf4fd7d5b15e621b88a20052 (patch)
tree4e929c12c6997452335d5620b5b5208affb83698 /doc/examples/cdrom.py
parent1b514e848902f609cba9b2247702fc6d714d2456 (diff)
downloadpython-apt-a8074615c2bac880bf4fd7d5b15e621b88a20052.tar.gz
* cdrom interface added
Diffstat (limited to 'doc/examples/cdrom.py')
-rw-r--r--doc/examples/cdrom.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/examples/cdrom.py b/doc/examples/cdrom.py
new file mode 100644
index 00000000..e1873093
--- /dev/null
+++ b/doc/examples/cdrom.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+# example how to deal with the depcache
+
+import apt_pkg
+import sys, os
+import copy
+
+from progress import CdromProgress
+
+
+# init
+apt_pkg.init()
+
+cdrom = apt_pkg.GetCdrom()
+print cdrom
+
+progress = CdromProgress()
+apt_pkg.Config.Set("APT::CDROM::Rename", "True")
+
+cdrom.Add(progress)
+
+print "Exiting"
+sys.exit(0)
+
+
+
+