Index: pykota/trunk/bin/edpykota
===================================================================
--- pykota/trunk/bin/edpykota (revision 2782)
+++ pykota/trunk/bin/edpykota (revision 2783)
@@ -177,7 +177,10 @@
             
         if not options["list"] :
-            self.display(_("Extracting datas..."))
+            percent = Percent(self)
+            percent.display(_("Extracting datas..."))
         printers = self.storage.getMatchingPrinters(options["printer"])
         entries = getattr(self.storage, "getMatching%ss" % suffix)(",".join(names))
+        if not options["list"] :
+            percent.setSize(len(printers) * len(entries))
         
         if options["list"] :
@@ -197,5 +200,5 @@
                         print
         elif options["delete"] :    
-            percent = Percent(self, "\n%s..." % _("Deletion"), len(printers) * len(entries))
+            percent.display("\n%s..." % _("Deletion"))
             getattr(self.storage, "deleteMany%sPQuotas" % suffix)(printers, entries)
             percent.display("\n")
@@ -252,5 +255,5 @@
             try :
                 if options["add"] :
-                    percent = Percent(self, "\n%s...\n" % _("Creation"), len(printers) * len(entries))
+                    percent.display("\n%s...\n" % _("Creation"))
                     dicnames = {}
                     for m in entries :
@@ -284,5 +287,5 @@
                             percent.oneMore()
                 else :        
-                    percent = Percent(self, "\n%s...\n" % _("Modification"), len(entries) * len(printers))
+                    percent.display("\n%s...\n" % _("Modification"))
                     for printer in printers :
                         for entry in entries :
@@ -302,8 +305,6 @@
                 self.storage.commitTransaction()
                             
-        try :
+        if not options["list"] :
             percent.done()
-        except NameError :    
-            pass
             
 if __name__ == "__main__" : 
Index: pykota/trunk/bin/pkbcodes
===================================================================
--- pykota/trunk/bin/pkbcodes (revision 2782)
+++ pykota/trunk/bin/pkbcodes (revision 2783)
@@ -97,7 +97,10 @@
             raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command."))
             
+        if not options["list"] :    
+            percent = Percent(self)
+            
         if not options["add"] :
             if not options["list"] :
-                self.display(_("Extracting datas..."))
+                percent.display(_("Extracting datas..."))
             if not names :      # NB : can't happen for --delete because it's catched earlier
                 names = ["*"]
@@ -105,4 +108,6 @@
             if not billingcodes :
                 raise PyKotaCommandLineError, _("There's no billingcode matching %s") % " ".join(names)
+            if not options["list"] :    
+                percent.setSize(len(billingcodes))
                         
         if options["list"] :
@@ -116,5 +121,5 @@
                        _("credits"))
         elif options["delete"] :    
-            percent = Percent(self, "\n%s..." % _("Deletion"), len(billingcodes))
+            percent.display("\n%s..." % _("Deletion"))
             self.storage.deleteManyBillingCodes(billingcodes)
             percent.display("\n")
@@ -129,5 +134,6 @@
             try :
                 if options["add"] :    
-                    percent = Percent(self, "%s...\n" % _("Creation"), len(names))
+                    percent.display("%s...\n" % _("Creation"))
+                    percent.setSize(len(names))
                     for bname in names :
                         billingcode = StorageBillingCode(self.storage, bname)
@@ -143,5 +149,5 @@
                         percent.oneMore()
                 else :        
-                    percent = Percent(self, "\n%s...\n" % _("Modification"), len(billingcodes))
+                    percent.display("\n%s...\n" % _("Modification"))
                     for billingcode in billingcodes :
                         self.modifyBillingCode(billingcode, reset, description)
@@ -154,8 +160,6 @@
                 self.storage.commitTransaction()
                         
-        try :
+        if not options["list"] :
             percent.done()
-        except NameError :    
-            pass
                      
 if __name__ == "__main__" : 
Index: pykota/trunk/bin/pkusers
===================================================================
--- pykota/trunk/bin/pkusers (revision 2782)
+++ pykota/trunk/bin/pkusers (revision 2783)
@@ -193,7 +193,10 @@
         suffix = (options["groups"] and "Group") or "User"        
         
+        if not options["list"] :
+            percent = Percent(self)
+            
         if not options["add"] :
             if not options["list"] :
-                self.display(_("Extracting datas..."))
+                percent.display(_("Extracting datas..."))
             if not names :      # NB : can't happen for --delete because it's catched earlier
                 names = ["*"]
@@ -201,4 +204,6 @@
             if not entries :
                 raise PyKotaCommandLineError, _("There's no %s matching %s") % (_(suffix.lower()), " ".join(names))
+            if not options["list"] :    
+                percent.setSize(len(entries))
                 
         if options["list"] :
@@ -235,5 +240,5 @@
                     print
         elif options["delete"] :    
-            percent = Percent(self, "\n%s..." % _("Deletion"), len(entries))
+            percent.display("\n%s..." % _("Deletion"))
             getattr(self.storage, "deleteMany%ss" % suffix)(entries)
             percent.display("\n")
@@ -287,5 +292,6 @@
                 if options["add"] :    
                     rejectunknown = self.config.getRejectUnknown()    
-                    percent = Percent(self, "%s...\n" % _("Creation"), len(names))
+                    percent.display("%s...\n" % _("Creation"))
+                    percent.setSize(len(names))
                     for ename in names :
                         email = None
@@ -347,5 +353,5 @@
                         percent.oneMore()
                 else :
-                    percent = Percent(self, "\n%s...\n" % _("Modification"), len(entries)) 
+                    percent.display("\n%s...\n" % _("Modification"))
                     for entry in entries :
                         if groups :
@@ -364,8 +370,6 @@
                 self.storage.commitTransaction()
                 
-        try :
+        if not options["list"] :
             percent.done()
-        except NameError :    
-            pass
                      
 if __name__ == "__main__" : 
Index: pykota/trunk/bin/pkprinters
===================================================================
--- pykota/trunk/bin/pkprinters (revision 2782)
+++ pykota/trunk/bin/pkprinters (revision 2783)
@@ -150,7 +150,10 @@
             raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command."))
             
+        if not options["list"] :    
+            percent = Percent(self)
+            
         if not options["add"] :
             if not options["list"] :
-                self.display(_("Extracting datas..."))
+                percent.display(_("Extracting datas..."))
             if not names :      # NB : can't happen for --delete because it's catched earlier
                 names = ["*"]
@@ -158,4 +161,6 @@
             if not printers :
                 raise PyKotaCommandLineError, _("There's no printer matching %s") % " ".join(names)
+            if not options["list"] :    
+                percent.setSize(len(printers))
                 
         if options["list"] :
@@ -171,5 +176,5 @@
                 print    
         elif options["delete"] :    
-            percent = Percent(self, "\n%s..." % _("Deletion"), len(printers))
+            percent.display("\n%s..." % _("Deletion"))
             self.storage.deleteManyPrinters(printers)
             percent.display("\n")
@@ -217,5 +222,6 @@
             try :
                 if options["add"] :    
-                    percent = Percent(self, "%s...\n" % _("Creation"), len(names))
+                    percent.display("%s...\n" % _("Creation"))
+                    percent.setSize(len(names))
                     for pname in names :
                         if self.isValidName(pname) :
@@ -244,5 +250,5 @@
                         percent.oneMore()
                 else :        
-                    percent = Percent(self, "\n%s...\n" % _("Modification"), len(printers))
+                    percent.display("\n%s...\n" % _("Modification"))
                     for printer in printers :        
                         self.modifyPrinter(printer, charges, perpage, perjob, \
@@ -258,8 +264,6 @@
                 self.storage.commitTransaction()
                 
-        try :
+        if not options["list"] :
             percent.done()
-        except NameError :    
-            pass
                      
 if __name__ == "__main__" : 
