summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-08-03 08:44:54 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-08-03 08:44:54 +0000
commitfe89d597e3f73c82488d17a8be8a8b8c900127ed (patch)
tree16638137b0aa748f6e7927b6a623f7b2323c4e31 /doc
parentdaf13af88e15fa27c0d911e87210e897894c5b9d (diff)
downloadpython-apt-fe89d597e3f73c82488d17a8be8a8b8c900127ed.tar.gz
* API BREAK: follow PEP08 now
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/gui-inst.py20
-rw-r--r--doc/examples/inst.py2
2 files changed, 11 insertions, 11 deletions
diff --git a/doc/examples/gui-inst.py b/doc/examples/gui-inst.py
index 26164b0c..677fee8b 100644
--- a/doc/examples/gui-inst.py
+++ b/doc/examples/gui-inst.py
@@ -12,7 +12,7 @@ import gtk
import vte
import time
-from progress import OpProgress, FetchProgress, InstallProgress
+from apt.progress import OpProgress, FetchProgress, InstallProgress
class GuiFetchProgress(gtk.Window, FetchProgress):
def __init__(self):
@@ -27,14 +27,14 @@ class GuiFetchProgress(gtk.Window, FetchProgress):
self.vbox.pack_start(self.progress)
self.vbox.pack_start(self.label)
self.resize(300,100)
- def Start(self):
+ def start(self):
self.progress.set_fraction(0)
self.show()
- def Stop(self):
+ def stop(self):
self.hide()
- def Pulse(self):
- self.label.set_text("Speed: %s/s" % apt_pkg.SizeToStr(self.CurrentCPS))
- self.progress.set_fraction(self.CurrentBytes/self.TotalBytes)
+ def pulse(self):
+ self.label.set_text("Speed: %s/s" % apt_pkg.SizeToStr(self.currentCPS))
+ self.progress.set_fraction(self.CurrentBytes/self.totalBytes)
while gtk.events_pending():
gtk.main_iteration()
@@ -45,15 +45,15 @@ class TermInstallProgress(InstallProgress, gtk.Window):
self.term = vte.Terminal()
self.term.show()
self.add(self.term)
- def Start(self):
+ def start(self):
self.progress.set_fraction(0)
self.show()
- def Stop(self):
+ def stop(self):
self.hide()
- def UpdateInterface(self):
+ def updateInterface(self):
while gtk.events_pending():
gtk.main_iteration()
- def FinishUpdate(self):
+ def finishUpdate(self):
sys.stdin.readline()
def fork(self):
return self.term.forkpty()
diff --git a/doc/examples/inst.py b/doc/examples/inst.py
index 6b3ade25..3cc4094e 100644
--- a/doc/examples/inst.py
+++ b/doc/examples/inst.py
@@ -5,7 +5,7 @@ import apt_pkg
import sys, os
import copy
-from progress import OpProgress, FetchProgress, InstallProgress
+from apt.progress import OpProgress, FetchProgress, InstallProgress
# init