From fe89d597e3f73c82488d17a8be8a8b8c900127ed Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 3 Aug 2005 08:44:54 +0000 Subject: * API BREAK: follow PEP08 now --- doc/examples/gui-inst.py | 20 ++++++++++---------- doc/examples/inst.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'doc/examples') 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 -- cgit v1.2.3