[pitivi] utils.py: add formatPercent function



commit 6a74dd84c9984a52c3825b2d4276cc5c9a72fdb2
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Mon Aug 17 15:34:34 2009 -0700

    utils.py: add formatPercent function

 pitivi/utils.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/utils.py b/pitivi/utils.py
index 4f6e3fc..296f7b9 100644
--- a/pitivi/utils.py
+++ b/pitivi/utils.py
@@ -439,6 +439,7 @@ def getNextObject(obj, objects, priority=-1, skip=None):
 
     return None
 
+
 class CachedFactoryList(object):
     def __init__(self, factoryFilter=None):
         self._factoryFilter = factoryFilter
@@ -485,3 +486,6 @@ def profile(func, profiler_filename="result.prof"):
         return locals()["result"]
 
     return _wrapper
+
+def formatPercent(value):
+    return "%3d%%" % (value * 100)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]