diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-04-08 11:55:14 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-04-08 11:55:14 +0000 |
| commit | 08ea34d6a28b4b17d0146535e85d61ab7bda341d (patch) | |
| tree | 468c9348b1ee62208fdc60be8ad23a769e02e2b7 /doc/examples/progress.py | |
| parent | 8f914ef267ab1bbcbda1c6694edd2e4c9b6401ec (diff) | |
| download | python-apt-08ea34d6a28b4b17d0146535e85d61ab7bda341d.tar.gz | |
* simple InstallProgress interface added
Diffstat (limited to 'doc/examples/progress.py')
| -rw-r--r-- | doc/examples/progress.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/examples/progress.py b/doc/examples/progress.py index f6cf1495..0dec95d1 100644 --- a/doc/examples/progress.py +++ b/doc/examples/progress.py @@ -1,5 +1,6 @@ import apt_pkg import sys +import time class OpProgress: def __init__(self): @@ -20,6 +21,13 @@ class OpProgress: class FetchProgress: def __init__(self): pass + + def Start(self): + pass + + def Stop(self): + pass + def UpdateStatus(self, uri, descr, shortDescr, status): print "UpdateStatus: '%s' '%s' '%s' '%i'" % (uri,descr,shortDescr, status) def Pulse(self): @@ -27,4 +35,17 @@ class FetchProgress: def MediaChange(self, medium, drive): print "Please insert medium %s in drive %s" % (medium, drive) - sys.stdin.readline()
\ No newline at end of file + sys.stdin.readline() + + +class InstallProgress: + def __init__(self): + pass + def StartUpdate(self): + print "StartUpdate" + def FinishUpdate(self): + print "FinishUpdate" + def UpdateInterface(self): + # usefull to e.g. redraw a GUI + time.sleep(0.1) + |
