summaryrefslogtreecommitdiff
path: root/doc/source/apt
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-03-08 18:23:12 +0100
committerJulian Andres Klode <jak@debian.org>2009-03-08 18:23:12 +0100
commit645c80f504f98332fb8eceb955c13a54e38e5956 (patch)
treeb333f7160da3d9d7cf9c9843ddacf5642223e4aa /doc/source/apt
parentc3f9f8637176e2411b4e84e632e595cfd5512e90 (diff)
downloadpython-apt-645c80f504f98332fb8eceb955c13a54e38e5956.tar.gz
* doc/source/*: Improve the documentation
- Document more attributes and functions of apt_pkg (they are all listed)
Diffstat (limited to 'doc/source/apt')
-rw-r--r--doc/source/apt/package.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/source/apt/package.rst b/doc/source/apt/package.rst
index 6781717c..bb74915e 100644
--- a/doc/source/apt/package.rst
+++ b/doc/source/apt/package.rst
@@ -10,6 +10,11 @@ The Package class
.. autoclass:: Package
:members:
+ .. note::
+
+ Several methods have been deprecated in version 0.7.9 of python-apt,
+ please see the :class:`Version` class for the new alternatives.
+
The Version class
-----------------
.. autoclass:: Version
@@ -93,14 +98,14 @@ Examples
cache = apt.Cache()
pkg = cache['python-apt'] # Access the Package object for python-apt
- print 'python-apt is trusted:', pkg.candidateOrigin.trusted
+ print 'python-apt is trusted:', pkg.candidate.origins[0].trusted
# Mark python-apt for install
pkg.markInstall()
print 'python-apt is marked for install:', pkg.markedInstall
- print 'python-apt is', pkg.summary #Python interface to libapt-pkg
+ print 'python-apt is (summary):', pkg.candidate.summary
# Now, really install it
cache.commit()