summaryrefslogtreecommitdiff
path: root/apt/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'apt/__init__.py')
-rw-r--r--apt/__init__.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/apt/__init__.py b/apt/__init__.py
index ae2abbf2..734b3240 100644
--- a/apt/__init__.py
+++ b/apt/__init__.py
@@ -17,17 +17,21 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
# import the core of apt_pkg
+"""High-Level Interface for working with apt."""
import apt_pkg
-import sys
-import os
# import some fancy classes
from apt.package import Package
from apt.cache import Cache
-from apt.progress import (
- OpProgress, FetchProgress, InstallProgress, CdromProgress)
from apt.cdrom import Cdrom
-from apt_pkg import SizeToStr, TimeToStr, VersionCompare
+
+if apt_pkg._COMPAT_0_7:
+ from apt.progress import (OpProgress, FetchProgress, InstallProgress,
+ CdromProgress)
+
+
+if apt_pkg._COMPAT_0_7:
+ from apt_pkg import SizeToStr, TimeToStr, VersionCompare
# init the package system
apt_pkg.init()
@@ -36,3 +40,4 @@ apt_pkg.init()
#import warnings
#warnings.warn("apt API not stable yet", FutureWarning)
#del warnings
+__all__ = ['Cache', 'Cdrom', 'Package']