Started converting the string formatting stuff.

Mon, 26 Jul 2010 15:45:23 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 26 Jul 2010 15:45:23 +0200
changeset 406
eacf81fad150
parent 405
374066392929
child 407
1a3e06617b96

Started converting the string formatting stuff.

DataViews/CodeMetrics.py file | annotate | diff | comparison | revisions
DataViews/PyCoverageDialog.py file | annotate | diff | comparison | revisions
DataViews/PyProfileDialog.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugClientBase.py file | annotate | diff | comparison | revisions
Debugger/DebugServer.py file | annotate | diff | comparison | revisions
Debugger/DebugUI.py file | annotate | diff | comparison | revisions
Debugger/DebugViewer.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython3.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfaceRuby.py file | annotate | diff | comparison | revisions
Debugger/ExceptionLogger.py file | annotate | diff | comparison | revisions
Debugger/VariablesViewer.py file | annotate | diff | comparison | revisions
DocumentationTools/APIGenerator.py file | annotate | diff | comparison | revisions
DocumentationTools/IndexGenerator.py file | annotate | diff | comparison | revisions
DocumentationTools/ModuleDocumentor.py file | annotate | diff | comparison | revisions
DocumentationTools/QtHelpGenerator.py file | annotate | diff | comparison | revisions
DocumentationTools/TemplatesListsStyle.py file | annotate | diff | comparison | revisions
DocumentationTools/TemplatesListsStyleCSS.py file | annotate | diff | comparison | revisions
--- a/DataViews/CodeMetrics.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DataViews/CodeMetrics.py	Mon Jul 26 15:45:23 2010 +0200
@@ -57,7 +57,7 @@
         text = Utilities.convertLineEnds(text, os.linesep)
         
         if not text.endswith(os.linesep):
-            text = "%s%s" % (text, os.linesep)
+            text = "{0}{1}".format(text, os.linesep)
             
         self.lines = text.count(os.linesep)
         
@@ -77,7 +77,7 @@
                 else:
                     self.__addToken(toktype, toktext, srow, scol, line)
         except tokenize.TokenError as msg:
-            print("Token Error: %s" % str(msg))
+            print("Token Error: {0}".format(str(msg)))
             return
         
         return
@@ -175,7 +175,7 @@
 
             for key in ('start', 'end', 'lines', 'nloc', 'comments', 'empty'):
                 if counters.get(key, 0):
-                    msg += " %5d" % (counters[key],)
+                    msg += " {0:d}".format(counters[key])
                 else:
                     msg += " " * 6
 
@@ -276,7 +276,7 @@
     print("\nSummary")
     for key in ['files', 'lines', 'bytes', 'comments',
                 'empty lines', 'non-commentary lines']:
-        print(key.ljust(20) + "%6d" % total[key])
+        print(key.ljust(20) + "{0:d}".format(total[key]))
     
     sys.exit(0)
 
--- a/DataViews/PyCoverageDialog.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DataViews/PyCoverageDialog.py	Mon Jul 26 15:45:23 2010 +0200
@@ -92,9 +92,9 @@
             """
             start, end = pair
             if start == end:
-                return "%d" % start
+                return "{0:d}".format(start)
             else:
-                return "%d-%d" % (start, end)
+                return "{0:d}-{1:d}".format(start, end)
         
         return ", ".join(map(stringify, pairs))
     
@@ -113,7 +113,7 @@
             file, 
             str(statements), 
             str(executed),
-            "%d%%" % coverage, 
+            "{0:d}%".format(coverage), 
             excluded, 
             missing
         ])
@@ -133,7 +133,7 @@
         
         self.basename = os.path.splitext(cfn)[0]
         
-        self.cfn = "%s.coverage" % self.basename
+        self.cfn = "{0}.coverage".format(self.basename)
         
         if isinstance(fn, list):
             files = fn
@@ -204,7 +204,7 @@
             itm = QTreeWidgetItem(self.summaryList, [
                 str(total_statements), 
                 str(total_executed),
-                "%d%%" % pc
+                "{0:d}%".format(pc)
             ])
             for col in range(0, 3):
                 itm.setTextAlignment(col, Qt.AlignRight)
--- a/DataViews/PyProfileDialog.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DataViews/PyProfileDialog.py	Mon Jul 26 15:45:23 2010 +0200
@@ -104,9 +104,9 @@
         """
         itm = ProfileTreeWidgetItem(self.resultList, [
             calls, 
-            "% 8.3f" % totalTime, 
+            "{0: 8.3f}".format(totalTime), 
             totalTimePerCall, 
-            "% 8.3f" % cumulativeTime, 
+            "{0: 8.3f}".format(cumulativeTime), 
             cumulativeTimePerCall, 
             file, 
             str(line), 
@@ -170,17 +170,17 @@
                         total_tt    += tt
                         
                         if nc != cc:
-                            c = "%d/%d" % (nc, cc)
+                            c = "{0:d}/{1:d}".format(nc, cc)
                         else:
                             c = str(nc)
                         if nc == 0:
-                            tpc = "% 8.3f" % 0.0
+                            tpc = "{0: 8.3f}".format(0.0)
                         else:
-                            tpc = "% 8.3f" % (tt/nc,)
+                            tpc = "{0: 8.3f}".format(tt/nc)
                         if cc == 0:
-                            cpc = "% 8.3f" % 0.0
+                            cpc = "{0: 8.3f}".format(0.0)
                         else:
-                            cpc = "% 8.3f" % (ct/cc,)
+                            cpc = "{0: 8.3f}".format(ct/cc)
                         self.__createResultItem(c, tt, tpc, ct, cpc, func[0], 
                                                 func[1], func[2])
                     
@@ -197,7 +197,7 @@
         self.__createSummaryItem(self.trUtf8("function calls"), str(total_calls))
         if total_calls != prim_calls:
             self.__createSummaryItem(self.trUtf8("primitive calls"), str(prim_calls))
-        self.__createSummaryItem(self.trUtf8("CPU seconds"), "%.3f" % total_tt)
+        self.__createSummaryItem(self.trUtf8("CPU seconds"), "{0:.3f}".format(total_tt))
         
     def start(self, pfn, fn=None):
         """
@@ -208,7 +208,7 @@
         """
         self.basename = os.path.splitext(pfn)[0]
         
-        fname = "%s.profile" % self.basename
+        fname = "{0}.profile".format(self.basename)
         if not os.path.exists(fname):
             QMessageBox.warning(None,
                 self.trUtf8("Profile Results"),
@@ -280,7 +280,7 @@
         """
         Private slot to handle the Erase Profile context menu action.
         """
-        fname = "%s.profile" % self.basename
+        fname = "{0}.profile".format(self.basename)
         if os.path.exists(fname):
             os.remove(fname)
         
@@ -288,7 +288,7 @@
         """
         Private slot to handle the Erase Timing context menu action.
         """
-        fname = "%s.timings" % self.basename
+        fname = "{0}.timings".format(self.basename)
         if os.path.exists(fname):
             os.remove(fname)
         
--- a/DebugClients/Python3/DebugClientBase.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DebugClients/Python3/DebugClientBase.py	Mon Jul 26 15:45:23 2010 +0200
@@ -1485,7 +1485,7 @@
             varlist.append(("user", "str", "{0}".format(value.userName())))
             varlist.append(("password", "str", "{0}".format(value.password())))
             varlist.append(("host", "str", "{0}".format(value.host())))
-            varlist.append(("port", "int", "%d" % value.port()))
+            varlist.append(("port", "int", "{0:d}".format(value.port())))
             varlist.append(("path", "str", "{0}".format(value.path())))
         elif qttype == 'QModelIndex':
             varlist.append(("valid", "bool", "{0}".format(value.isValid())))
--- a/Debugger/DebugServer.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/DebugServer.py	Mon Jul 26 15:45:23 2010 +0200
@@ -170,12 +170,12 @@
             if localhost:
                 return "127.0.0.1"
             else:
-                return "%s@@v4" % QHostInfo.localHostName()
+                return "{0}@@v4".format(QHostInfo.localHostName())
         elif self.networkInterface == "allv6":
             if localhost:
                 return "::1"
             else:
-                return "%s@@v6" % QHostInfo.localHostName()
+                return "{0}@@v6".format(QHostInfo.localHostName())
         else:
             return self.networkInterface
         
@@ -193,7 +193,7 @@
         self.__clientAssociations = {}
         
         for interface in DebuggerInterfaces:
-            modName = "Debugger.%s" % interface
+            modName = "Debugger.{0}".format(interface)
             mod = __import__(modName)
             components = modName.split('.')
             for comp in components[1:]:
@@ -438,9 +438,9 @@
             _cond = cond
         else:
             if special == self.watchSpecialCreated:
-                _cond = "%s ??created??" % cond
+                _cond = "{0} ??created??".format(cond)
             elif special == self.watchSpecialChanged:
-                _cond = "%s ??changed??" % cond
+                _cond = "{0} ??changed??".format(cond)
         return _cond
         
     def __splitWatchCondition(self, cond):
--- a/Debugger/DebugUI.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/DebugUI.py	Mon Jul 26 15:45:23 2010 +0200
@@ -1291,10 +1291,10 @@
             if not cond:
                 formattedCond = ""
             else:
-                formattedCond = " : %s" % cond[:20]
-            bpSuffix = " : %d%s" % (line, formattedCond)
+                formattedCond = " : {0}".format(cond[:20])
+            bpSuffix = " : {0:d}{1}".format(line, formattedCond)
             act = self.breakpointsMenu.addAction(
-                "%s%s" % (
+                "{0}{1}".format(
                     Utilities.compactPath(
                         filename,
                         self.ui.maxMenuFilePathLen - len(bpSuffix)), 
@@ -1416,7 +1416,7 @@
             
             if not doNotStart:
                 if runProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin=%s %s" % (fn, argv)
+                    argv = "--plugin={0} {1}".format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
                 # Ask the client to open the new program.
@@ -1520,7 +1520,7 @@
             
             if not doNotStart:
                 if runProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin=%s %s" % (fn, argv)
+                    argv = "--plugin={0} {1}".format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
                 # Ask the client to open the new program.
@@ -1627,7 +1627,7 @@
             
             if not doNotStart:
                 if runProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin=%s %s" % (fn, argv)
+                    argv = "--plugin={0} {1}".format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
                 # Ask the client to open the new program.
@@ -1742,7 +1742,7 @@
             
             if not doNotStart:
                 if debugProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin=%s %s" % (fn, argv)
+                    argv = "--plugin={0} {1}".format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                     tracePython = True # override flag because it must be true
                 
@@ -1793,7 +1793,7 @@
         
         if not doNotStart:
             if forProject and self.project.getProjectType() == "E4Plugin":
-                argv = "--plugin=%s %s" % (fn, argv)
+                argv = "--plugin={0} {1}".format(fn, argv)
                 fn = os.path.join(getConfig('ericDir'), "eric5.py")
             
             if self.lastStartAction in [1, 2]:
--- a/Debugger/DebugViewer.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/DebugViewer.py	Mon Jul 26 15:45:23 2010 +0200
@@ -331,7 +331,7 @@
         for s in stack:
             # just show base filename to make it readable
             s = (os.path.basename(s[0]), s[1], s[2])
-            self.stackComboBox.addItem('%s:%s:%s' % s)
+            self.stackComboBox.addItem('{0}:{1}:{2}'.format(*s))
         
     def setVariablesFilter(self, globalsFilter, localsFilter):
         """
@@ -411,7 +411,7 @@
             else:
                 state = self.trUtf8("running")
             itm = QTreeWidgetItem(self.__threadList, 
-                                  ["%d" % thread['id'], thread['name'], state])
+                                  ["{0:d}".format(thread['id']), thread['name'], state])
             if thread['id'] == currentID:
                 citm = itm
         
--- a/Debugger/DebuggerInterfacePython.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/DebuggerInterfacePython.py	Mon Jul 26 15:45:23 2010 +0200
@@ -38,7 +38,7 @@
         if ext.startswith("."):
             exts.append(ext)
         else:
-            exts.append(".%s" % ext)
+            exts.append(".{0}".format(ext))
     
     if exts and Preferences.getDebugger("PythonInterpreter"):
         return ["Python", ClientDefaultCapabilities, exts]
@@ -121,7 +121,7 @@
         if environment is not None:
             env = []
             for key, value in list(environment.items()):
-                env.append("%s=%s" % (key, value))
+                env.append("{0}={1}".format(key, value))
             proc.setEnvironment(env)
         args = []
         for arg in arguments:
@@ -388,7 +388,7 @@
         self.disconnect(self.qsock, SIGNAL('readyRead()'), self.__parseClientLine)
         
         # close down socket, and shut down client as well.
-        self.__sendCommand('%s\n' % RequestShutdown)
+        self.__sendCommand('{0}\n'.format(RequestShutdown))
         self.qsock.flush()
         
         self.qsock.close()
@@ -411,7 +411,7 @@
         
         @param env environment settings (dictionary)
         """
-        self.__sendCommand('%s%s\n' % (RequestEnv, str(env)))
+        self.__sendCommand('{0}{1}\n'.format(RequestEnv, str(env)))
         
     def remoteLoad(self, fn, argv, wd, traceInterpreter = False, autoContinue = True, 
                    autoFork = False, forkChild = False):
@@ -432,9 +432,9 @@
         
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s\n' % (RequestForkMode, repr((autoFork, forkChild))))
-        self.__sendCommand('%s%s|%s|%s|%d\n' % \
-            (RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)),
+        self.__sendCommand('{0}{1}\n'.format(RequestForkMode, repr((autoFork, forkChild))))
+        self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format(
+            RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)),
              traceInterpreter))
         
     def remoteRun(self, fn, argv, wd, autoFork = False, forkChild = False):
@@ -449,9 +449,9 @@
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s\n' % (RequestForkMode, repr((autoFork, forkChild))))
-        self.__sendCommand('%s%s|%s|%s\n' % \
-            (RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
+        self.__sendCommand('{0}{1}\n'.format(RequestForkMode, repr((autoFork, forkChild))))
+        self.__sendCommand('{0}{1}|{2}|{3}\n'.format(
+            RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
         
     def remoteCoverage(self, fn, argv, wd, erase = False):
         """
@@ -465,8 +465,8 @@
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s@@%s@@%s@@%d\n' % \
-            (RequestCoverage, wd, fn, str(Utilities.parseOptionString(argv)),
+        self.__sendCommand('{0}{1}@@{2}@@{3}@@{4:d}\n'.format(
+            RequestCoverage, wd, fn, str(Utilities.parseOptionString(argv)),
              erase))
 
     def remoteProfile(self, fn, argv, wd, erase = False):
@@ -480,8 +480,8 @@
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s|%s|%s|%d\n' % \
-            (RequestProfile, wd, fn, str(Utilities.parseOptionString(argv)), erase))
+        self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format(
+            RequestProfile, wd, fn, str(Utilities.parseOptionString(argv)), erase))
 
     def remoteStatement(self, stmt):
         """
@@ -490,7 +490,7 @@
         @param stmt the Python statement to execute (string). It
               should not have a trailing newline.
         """
-        self.__sendCommand('%s\n' % stmt)
+        self.__sendCommand('{0}\n'.format(stmt))
         self.__sendCommand(RequestOK + '\n')
 
     def remoteStep(self):
@@ -523,7 +523,7 @@
         
         @param special flag indicating a special continue operation (boolean)
         """
-        self.__sendCommand('%s%d\n' % (RequestContinue, special))
+        self.__sendCommand('{0}{1:d}\n'.format(RequestContinue, special))
 
     def remoteBreakpoint(self, fn, line, set, cond = None, temp = False):
         """
@@ -536,8 +536,8 @@
         @param temp flag indicating a temporary breakpoint (boolean)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s@@%d@@%d@@%d@@%s\n' % \
-                           (RequestBreak, fn, line, temp, set, cond))
+        self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format(
+                           RequestBreak, fn, line, temp, set, cond))
         
     def remoteBreakpointEnable(self, fn, line, enable):
         """
@@ -548,7 +548,8 @@
         @param enable flag indicating enabling or disabling a breakpoint (boolean)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s,%d,%d\n' % (RequestBreakEnable, fn, line, enable))
+        self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format(
+                           RequestBreakEnable, fn, line, enable))
         
     def remoteBreakpointIgnore(self, fn, line, count):
         """
@@ -559,7 +560,8 @@
         @param count number of occurrences to ignore (int)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s,%d,%d\n' % (RequestBreakIgnore, fn, line, count))
+        self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format(
+                           RequestBreakIgnore, fn, line, count))
         
     def remoteWatchpoint(self, cond, set, temp = False):
         """
@@ -570,7 +572,7 @@
         @param temp flag indicating a temporary watch expression (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s@@%d@@%d\n' % (RequestWatch, cond, temp, set))
+        self.__sendCommand('{0}{1}@@{2:d}@@{3:d}\n'.format(RequestWatch, cond, temp, set))
     
     def remoteWatchpointEnable(self, cond, enable):
         """
@@ -580,7 +582,7 @@
         @param enable flag indicating enabling or disabling a watch expression (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s,%d\n' % (RequestWatchEnable, cond, enable))
+        self.__sendCommand('{0}{1},{2:d}\n'.format(RequestWatchEnable, cond, enable))
     
     def remoteWatchpointIgnore(self, cond, count):
         """
@@ -590,7 +592,7 @@
         @param count number of occurrences to ignore (int)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s,%d\n' % (RequestWatchIgnore, cond, count))
+        self.__sendCommand('{0}{1},{2:d}\n'.format(RequestWatchIgnore, cond, count))
     
     def remoteRawInput(self,s):
         """
@@ -604,7 +606,7 @@
         """
         Public method to request the list of threads from the client.
         """
-        self.__sendCommand('%s\n' % RequestThreadList)
+        self.__sendCommand('{0}\n'.format(RequestThreadList))
         
     def remoteSetThread(self, tid):
         """
@@ -612,7 +614,7 @@
         
         @param tid id of the thread (integer)
         """
-        self.__sendCommand('%s%d\n' % (RequestThreadSet, tid))
+        self.__sendCommand('{0}{1:d}\n'.format(RequestThreadSet, tid))
         
     def remoteClientVariables(self, scope, filter, framenr = 0):
         """
@@ -622,8 +624,8 @@
         @param filter list of variable types to filter out (list of int)
         @param framenr framenumber of the variables to retrieve (int)
         """
-        self.__sendCommand('%s%d, %d, %s\n' % \
-            (RequestVariables, framenr, scope, str(filter)))
+        self.__sendCommand('{0}{1:d}, {2:d}, {3}\n'.format(
+            RequestVariables, framenr, scope, str(filter)))
         
     def remoteClientVariable(self, scope, filter, var, framenr = 0):
         """
@@ -634,8 +636,8 @@
         @param var list encoded name of variable to retrieve (string)
         @param framenr framenumber of the variables to retrieve (int)
         """
-        self.__sendCommand('%s%s, %d, %d, %s\n' % \
-            (RequestVariable, str(var), framenr, scope, str(filter)))
+        self.__sendCommand('{0}{1}, {2:d}, {3:d}, {4}\n'.format(
+            RequestVariable, str(var), framenr, scope, str(filter)))
         
     def remoteClientSetFilter(self, scope, filter):
         """
@@ -644,7 +646,7 @@
         @param scope the scope of the variables (0 = local, 1 = global)
         @param filter regexp string for variable names to filter out (string)
         """
-        self.__sendCommand('%s%d, "%s"\n' % (RequestSetFilter, scope, filter))
+        self.__sendCommand('{0}{1:d}, "{2}"\n'.format(RequestSetFilter, scope, filter))
         
     def remoteEval(self, arg):
         """
@@ -652,7 +654,7 @@
         
         @param arg the arguments to evaluate (string)
         """
-        self.__sendCommand('%s%s\n' % (RequestEval, arg))
+        self.__sendCommand('{0}{1}\n'.format(RequestEval, arg))
         
     def remoteExec(self, stmt):
         """
@@ -660,7 +662,7 @@
         
         @param stmt statement to execute (string)
         """
-        self.__sendCommand('%s%s\n' % (RequestExec, stmt))
+        self.__sendCommand('{0}{1}\n'.format(RequestExec, stmt))
         
     def remoteBanner(self):
         """
@@ -681,7 +683,7 @@
         
         @param text the text to be completed (string)
         """
-        self.__sendCommand("%s%s\n" % (RequestCompletion, text))
+        self.__sendCommand("{0}{1}\n".format(RequestCompletion, text))
         
     def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase):
         """
@@ -696,20 +698,20 @@
         @param coverase flag indicating erasure of coverage data is requested
         """
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s|%s|%s|%d|%s|%d\n' % \
-            (RequestUTPrepare, fn, tn, tfn, cov, covname, coverase))
+        self.__sendCommand('{0}{1}|{2}|{3}|{4:d}|{5}|{6:d}\n'.format(
+            RequestUTPrepare, fn, tn, tfn, cov, covname, coverase))
         
     def remoteUTRun(self):
         """
         Public method to start a unittest run.
         """
-        self.__sendCommand('%s\n' % RequestUTRun)
+        self.__sendCommand('{0}\n'.format(RequestUTRun))
         
     def remoteUTStop(self):
         """
         Public method to stop a unittest run.
         """
-        self.__sendCommand('%s\n' % RequestUTStop)
+        self.__sendCommand('{0}\n'.format(RequestUTStop))
         
     def __askForkTo(self):
         """
--- a/Debugger/DebuggerInterfacePython3.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/DebuggerInterfacePython3.py	Mon Jul 26 15:45:23 2010 +0200
@@ -38,7 +38,7 @@
         if ext.startswith("."):
             exts.append(ext)
         else:
-            exts.append(".%s" % ext)
+            exts.append(".{0}".format(ext))
     
     if exts:
         return ["Python3", ClientDefaultCapabilities, exts]
@@ -121,7 +121,7 @@
         if environment is not None:
             env = []
             for key, value in list(environment.items()):
-                env.append("%s=%s" % (key, value))
+                env.append("{0}={1}".format(key, value))
             proc.setEnvironment(env)
         args = []
         for arg in arguments:
@@ -387,7 +387,7 @@
         self.disconnect(self.qsock, SIGNAL('readyRead()'), self.__parseClientLine)
         
         # close down socket, and shut down client as well.
-        self.__sendCommand('%s\n' % RequestShutdown)
+        self.__sendCommand('{0}\n'.format(RequestShutdown))
         self.qsock.flush()
         
         self.qsock.close()
@@ -410,7 +410,7 @@
         
         @param env environment settings (dictionary)
         """
-        self.__sendCommand('%s%s\n' % (RequestEnv, str(env)))
+        self.__sendCommand('{0}{1}\n'.format(RequestEnv, str(env)))
     
     def remoteLoad(self, fn, argv, wd, traceInterpreter = False, autoContinue = True, 
                    autoFork = False, forkChild = False):
@@ -431,9 +431,9 @@
         
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s\n' % (RequestForkMode, repr((autoFork, forkChild))))
-        self.__sendCommand('%s%s|%s|%s|%d\n' % \
-            (RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), 
+        self.__sendCommand('{0}{1}\n'.format(RequestForkMode, repr((autoFork, forkChild))))
+        self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format(
+            RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), 
              traceInterpreter))
     
     def remoteRun(self, fn, argv, wd, autoFork = False, forkChild = False):
@@ -448,9 +448,9 @@
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s\n' % (RequestForkMode, repr((autoFork, forkChild))))
-        self.__sendCommand('%s%s|%s|%s\n' % \
-            (RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
+        self.__sendCommand('{0}{1}\n'.format(RequestForkMode, repr((autoFork, forkChild))))
+        self.__sendCommand('{0}{1}|{2}|{3}\n'.format(
+            RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
     
     def remoteCoverage(self, fn, argv, wd, erase = False):
         """
@@ -464,8 +464,8 @@
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s@@%s@@%s@@%d\n' % \
-            (RequestCoverage, wd, fn, str(Utilities.parseOptionString(argv)),
+        self.__sendCommand('{0}{1}@@{2}@@{3}@@{4:d}\n'.format(
+            RequestCoverage, wd, fn, str(Utilities.parseOptionString(argv)),
              erase))
 
     def remoteProfile(self, fn, argv, wd, erase = False):
@@ -479,8 +479,8 @@
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s|%s|%s|%d\n' % \
-            (RequestProfile, wd, fn, str(Utilities.parseOptionString(argv)), erase))
+        self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format(
+            RequestProfile, wd, fn, str(Utilities.parseOptionString(argv)), erase))
 
     def remoteStatement(self, stmt):
         """
@@ -489,7 +489,7 @@
         @param stmt the Python statement to execute (string). It
               should not have a trailing newline.
         """
-        self.__sendCommand('%s\n' % stmt)
+        self.__sendCommand('{0}\n'.format(stmt))
         self.__sendCommand(RequestOK + '\n')
 
     def remoteStep(self):
@@ -522,7 +522,7 @@
         
         @param special flag indicating a special continue operation
         """
-        self.__sendCommand('%s%d\n' % (RequestContinue, special))
+        self.__sendCommand('{0}{1:d}\n'.format(RequestContinue, special))
 
     def remoteBreakpoint(self, fn, line, set, cond = None, temp = False):
         """
@@ -535,8 +535,8 @@
         @param temp flag indicating a temporary breakpoint (boolean)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s@@%d@@%d@@%d@@%s\n' % \
-                           (RequestBreak, fn, line, temp, set, cond))
+        self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format(
+                           RequestBreak, fn, line, temp, set, cond))
     
     def remoteBreakpointEnable(self, fn, line, enable):
         """
@@ -547,7 +547,8 @@
         @param enable flag indicating enabling or disabling a breakpoint (boolean)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s,%d,%d\n' % (RequestBreakEnable, fn, line, enable))
+        self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format(
+            RequestBreakEnable, fn, line, enable))
     
     def remoteBreakpointIgnore(self, fn, line, count):
         """
@@ -558,7 +559,8 @@
         @param count number of occurrences to ignore (int)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s,%d,%d\n' % (RequestBreakIgnore, fn, line, count))
+        self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format(
+            RequestBreakIgnore, fn, line, count))
     
     def remoteWatchpoint(self, cond, set, temp = False):
         """
@@ -569,7 +571,7 @@
         @param temp flag indicating a temporary watch expression (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s@@%d@@%d\n' % (RequestWatch, cond, temp, set))
+        self.__sendCommand('{0}{1}@@{2:d}@@{3:d}\n'.format(RequestWatch, cond, temp, set))
     
     def remoteWatchpointEnable(self, cond, enable):
         """
@@ -579,7 +581,7 @@
         @param enable flag indicating enabling or disabling a watch expression (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s,%d\n' % (RequestWatchEnable, cond, enable))
+        self.__sendCommand('{0}{1},{2:d}\n'.format(RequestWatchEnable, cond, enable))
     
     def remoteWatchpointIgnore(self, cond, count):
         """
@@ -589,7 +591,7 @@
         @param count number of occurrences to ignore (int)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s,%d\n' % (RequestWatchIgnore, cond, count))
+        self.__sendCommand('{0}{1},{2:d}\n'.format(RequestWatchIgnore, cond, count))
     
     def remoteRawInput(self,s):
         """
@@ -603,7 +605,7 @@
         """
         Public method to request the list of threads from the client.
         """
-        self.__sendCommand('%s\n' % RequestThreadList)
+        self.__sendCommand('{0}\n'.format(RequestThreadList))
         
     def remoteSetThread(self, tid):
         """
@@ -611,7 +613,7 @@
         
         @param tid id of the thread (integer)
         """
-        self.__sendCommand('%s%d\n' % (RequestThreadSet, tid))
+        self.__sendCommand('{0}{1:d}\n'.format(RequestThreadSet, tid))
         
     def remoteClientVariables(self, scope, filter, framenr = 0):
         """
@@ -621,8 +623,8 @@
         @param filter list of variable types to filter out (list of int)
         @param framenr framenumber of the variables to retrieve (int)
         """
-        self.__sendCommand('%s%d, %d, %s\n' % \
-            (RequestVariables, framenr, scope, str(filter)))
+        self.__sendCommand('{0}{1:d}, {2:d}, {3}\n'.format(
+            RequestVariables, framenr, scope, str(filter)))
     
     def remoteClientVariable(self, scope, filter, var, framenr = 0):
         """
@@ -633,8 +635,8 @@
         @param var list encoded name of variable to retrieve (string)
         @param framenr framenumber of the variables to retrieve (int)
         """
-        self.__sendCommand('%s%s, %d, %d, %s\n' % \
-            (RequestVariable, str(var), framenr, scope, str(filter)))
+        self.__sendCommand('{0}{1}, {2:d}, {3:d}, {4}\n'.format(
+            RequestVariable, str(var), framenr, scope, str(filter)))
     
     def remoteClientSetFilter(self, scope, filter):
         """
@@ -643,7 +645,7 @@
         @param scope the scope of the variables (0 = local, 1 = global)
         @param filter regexp string for variable names to filter out (string)
         """
-        self.__sendCommand('%s%d, "%s"\n' % (RequestSetFilter, scope, filter))
+        self.__sendCommand('{0}{1:d}, "{2}"\n'.format(RequestSetFilter, scope, filter))
     
     def remoteEval(self, arg):
         """
@@ -651,7 +653,7 @@
         
         @param arg the arguments to evaluate (string)
         """
-        self.__sendCommand('%s%s\n' % (RequestEval, arg))
+        self.__sendCommand('{0}{1}\n'.format(RequestEval, arg))
     
     def remoteExec(self, stmt):
         """
@@ -659,7 +661,7 @@
         
         @param stmt statement to execute (string)
         """
-        self.__sendCommand('%s%s\n' % (RequestExec, stmt))
+        self.__sendCommand('{0}{1}\n'.format(RequestExec, stmt))
     
     def remoteBanner(self):
         """
@@ -680,7 +682,7 @@
         
         @param text the text to be completed (string)
         """
-        self.__sendCommand("%s%s\n" % (RequestCompletion, text))
+        self.__sendCommand("{0}{1}\n".format(RequestCompletion, text))
     
     def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase):
         """
@@ -695,20 +697,20 @@
         @param coverase flag indicating erasure of coverage data is requested
         """
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s|%s|%s|%d|%s|%d\n' % \
-            (RequestUTPrepare, fn, tn, tfn, cov, covname, coverase))
+        self.__sendCommand('{0}{1}|{2}|{3}|{4:d}|{5}|{6:d}\n'.format(
+            RequestUTPrepare, fn, tn, tfn, cov, covname, coverase))
     
     def remoteUTRun(self):
         """
         Public method to start a unittest run.
         """
-        self.__sendCommand('%s\n' % RequestUTRun)
+        self.__sendCommand('{0}\n'.format(RequestUTRun))
     
     def remoteUTStop(self):
         """
         Public method to stop a unittest run.
         """
-        self.__sendCommand('%s\n' % RequestUTStop)
+        self.__sendCommand('{0}\n'.format(RequestUTStop))
     
     def __askForkTo(self):
         """
--- a/Debugger/DebuggerInterfaceRuby.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/DebuggerInterfaceRuby.py	Mon Jul 26 15:45:23 2010 +0200
@@ -116,7 +116,7 @@
         if environment is not None:
             env = []
             for key, value in list(environment.items()):
-                env.append("%s=%s" % (key, value))
+                env.append("{0}={1}".format(key, value))
             proc.setEnvironment(env)
         args = []
         for arg in arguments:
@@ -364,7 +364,7 @@
         self.disconnect(self.qsock, SIGNAL('readyRead()'), self.__parseClientLine)
         
         # close down socket, and shut down client as well.
-        self.__sendCommand('%s\n' % RequestShutdown)
+        self.__sendCommand('{0}\n'.format(RequestShutdown))
         self.qsock.flush()
         
         self.qsock.close()
@@ -387,7 +387,7 @@
         
         @param env environment settings (dictionary)
         """
-        self.__sendCommand('%s%s\n' % (RequestEnv, str(env)))
+        self.__sendCommand('{0}{1}\n'.format(RequestEnv, str(env)))
         
     def remoteLoad(self, fn, argv, wd, traceInterpreter = False, autoContinue = True, 
                    autoFork = False, forkChild = False):
@@ -409,8 +409,8 @@
         
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s|%s|%s|%d\n' % \
-            (RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), 
+        self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format(
+            RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), 
              traceInterpreter))
         
     def remoteRun(self, fn, argv, wd, autoFork = False, forkChild = False):
@@ -426,8 +426,8 @@
         """
         wd = self.translate(wd, False)
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('%s%s|%s|%s\n' % \
-            (RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
+        self.__sendCommand('{0}{1}|{2}|{3}\n'.format(
+            RequestRun, wd, fn, str(Utilities.parseOptionString(argv))))
         
     def remoteCoverage(self, fn, argv, wd, erase = False):
         """
@@ -459,7 +459,7 @@
         @param stmt the Ruby statement to execute (string). It
               should not have a trailing newline.
         """
-        self.__sendCommand('%s\n' % stmt)
+        self.__sendCommand('{0}\n'.format(stmt))
         self.__sendCommand(RequestOK + '\n')
 
     def remoteStep(self):
@@ -492,7 +492,7 @@
         
         @param special flag indicating a special continue operation (boolean)
         """
-        self.__sendCommand('%s%d\n' % (RequestContinue, special))
+        self.__sendCommand('{0}{1:d}\n'.format(RequestContinue, special))
 
     def remoteBreakpoint(self, fn, line, set, cond = None, temp = False):
         """
@@ -505,8 +505,8 @@
         @param temp flag indicating a temporary breakpoint (boolean)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s@@%d@@%d@@%d@@%s\n' % \
-                           (RequestBreak, fn, line, temp, set, cond))
+        self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format(
+                           RequestBreak, fn, line, temp, set, cond))
         
     def remoteBreakpointEnable(self, fn, line, enable):
         """
@@ -517,7 +517,8 @@
         @param enable flag indicating enabling or disabling a breakpoint (boolean)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s,%d,%d\n' % (RequestBreakEnable, fn, line, enable))
+        self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format(
+            RequestBreakEnable, fn, line, enable))
         
     def remoteBreakpointIgnore(self, fn, line, count):
         """
@@ -528,7 +529,8 @@
         @param count number of occurrences to ignore (int)
         """
         fn = self.translate(fn, False)
-        self.__sendCommand('%s%s,%d,%d\n' % (RequestBreakIgnore, fn, line, count))
+        self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format(
+            RequestBreakIgnore, fn, line, count))
         
     def remoteWatchpoint(self, cond, set, temp = False):
         """
@@ -539,7 +541,7 @@
         @param temp flag indicating a temporary watch expression (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s@@%d@@%d\n' % (RequestWatch, cond, temp, set))
+        self.__sendCommand('{0}{1}@@{2:d}@@{3:d}\n'.format(RequestWatch, cond, temp, set))
     
     def remoteWatchpointEnable(self, cond, enable):
         """
@@ -549,7 +551,7 @@
         @param enable flag indicating enabling or disabling a watch expression (boolean)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s,%d\n' % (RequestWatchEnable, cond, enable))
+        self.__sendCommand('{0}{1},{2:d}\n'.format(RequestWatchEnable, cond, enable))
     
     def remoteWatchpointIgnore(self, cond, count):
         """
@@ -559,7 +561,7 @@
         @param count number of occurrences to ignore (int)
         """
         # cond is combination of cond and special (s. watch expression viewer)
-        self.__sendCommand('%s%s,%d\n' % (RequestWatchIgnore, cond, count))
+        self.__sendCommand('{0}{1},{2:d}\n'.format(RequestWatchIgnore, cond, count))
     
     def remoteRawInput(self,s):
         """
@@ -591,8 +593,8 @@
         @param filter list of variable types to filter out (list of int)
         @param framenr framenumber of the variables to retrieve (int)
         """
-        self.__sendCommand('%s%d, %d, %s\n' % \
-            (RequestVariables, framenr, scope, str(filter)))
+        self.__sendCommand('{0}{1:d}, {2:d}, {3}\n'.format(
+            RequestVariables, framenr, scope, str(filter)))
         
     def remoteClientVariable(self, scope, filter, var, framenr = 0):
         """
@@ -603,8 +605,8 @@
         @param var list encoded name of variable to retrieve (string)
         @param framenr framenumber of the variables to retrieve (int)
         """
-        self.__sendCommand('%s%s, %d, %d, %s\n' % \
-            (RequestVariable, str(var), framenr, scope, str(filter)))
+        self.__sendCommand('{0}{1}, {2:d}, {3:d}, {4}\n'.format(
+            RequestVariable, str(var), framenr, scope, str(filter)))
         
     def remoteClientSetFilter(self, scope, filter):
         """
@@ -613,7 +615,7 @@
         @param scope the scope of the variables (0 = local, 1 = global)
         @param filter regexp string for variable names to filter out (string)
         """
-        self.__sendCommand('%s%d, "%s"\n' % (RequestSetFilter, scope, filter))
+        self.__sendCommand('{0}{1:d}, "{2}"\n'.format(RequestSetFilter, scope, filter))
         
     def remoteEval(self, arg):
         """
@@ -621,7 +623,7 @@
         
         @param arg the arguments to evaluate (string)
         """
-        self.__sendCommand('%s%s\n' % (RequestEval, arg))
+        self.__sendCommand('{0}{1}\n'.format(RequestEval, arg))
         
     def remoteExec(self, stmt):
         """
@@ -629,7 +631,7 @@
         
         @param stmt statement to execute (string)
         """
-        self.__sendCommand('%s%s\n' % (RequestExec, stmt))
+        self.__sendCommand('{0}{1}\n'.format(RequestExec, stmt))
         
     def remoteBanner(self):
         """
@@ -650,7 +652,7 @@
         
         @param text the text to be completed (string)
         """
-        self.__sendCommand("%s%s\n" % (RequestCompletion, text))
+        self.__sendCommand("{0}{1}\n".format(RequestCompletion, text))
         
     def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase):
         """
--- a/Debugger/ExceptionLogger.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/ExceptionLogger.py	Mon Jul 26 15:45:23 2010 +0200
@@ -101,14 +101,14 @@
             return
         
         if exceptionMessage == '':
-            itm.setText(0, "%s" % exceptionType)
+            itm.setText(0, "{0}".format(exceptionType))
         else:
-            itm.setText(0, "%s, %s" % (exceptionType, exceptionMessage))
+            itm.setText(0, "{0}, {1}".format(exceptionType, exceptionMessage))
         
         # now add the call stack, most recent call first
         for fn, ln in stackTrace:
             excitm = QTreeWidgetItem(itm)
-            excitm.setText(0, "%s, %d" % (fn, ln))
+            excitm.setText(0, "{0}, {1:d}".format(fn, ln))
             
     def debuggingStarted(self):
         """
@@ -136,4 +136,4 @@
         """
         Private method to open the configuration dialog.
         """
-        e5App().getObject("UserInterface").showPreferences("debuggerGeneralPage")
\ No newline at end of file
+        e5App().getObject("UserInterface").showPreferences("debuggerGeneralPage")
--- a/Debugger/VariablesViewer.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/Debugger/VariablesViewer.py	Mon Jul 26 15:45:23 2010 +0200
@@ -180,7 +180,7 @@
         element 10 with a key of '000010'
         """
         keyStr = self.text(0)
-        self.arrayElementKey = "%.6d" % int(keyStr)
+        self.arrayElementKey = "{0:.6d}".format(int(keyStr))
 
     def key(self, column):
         """
@@ -217,7 +217,7 @@
         element 10 with a key of '000010'
         """
         keyStr = self.text(0)[:-2] # strip off [], () or {}
-        self.arrayElementKey = "%.6d" % int(keyStr)
+        self.arrayElementKey = "{0:.6d}".format(int(keyStr))
 
     def key(self, column):
         """
@@ -528,7 +528,7 @@
         if parent is None:
             parent = self
         try:
-            dvar = '%s%s' % (var, self.indicators[vtype])
+            dvar = '{0}{1}'.format(var, self.indicators[vtype])
         except KeyError:
             dvar = var
         dvtype = self.__getDispType(vtype)
@@ -617,12 +617,12 @@
             pname = par.text(0)
             if pname[-2:] in ['[]', '{}', '()']:
                 if nlist[0].endswith("."):
-                    nlist[0] = '[%s].' % nlist[0][:-1]
+                    nlist[0] = '[{0}].'.format(nlist[0][:-1])
                 else:
-                    nlist[0] = '[%s]' % nlist[0]
+                    nlist[0] = '[{0}]'.format(nlist[0])
                 nlist.insert(0, pname[:-2])
             else:
-                nlist.insert(0, '%s.' % pname)
+                nlist.insert(0, '{0}.'.format(pname))
             par = par.parent()
             
         name = ''.join(nlist)
--- a/DocumentationTools/APIGenerator.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DocumentationTools/APIGenerator.py	Mon Jul 26 15:45:23 2010 +0200
@@ -39,7 +39,7 @@
             del modulePath[-1]
         if basePackage:
             modulePath[0] = basePackage
-        self.moduleName = "%s." % '.'.join(modulePath)
+        self.moduleName = "{0}.".format('.'.join(modulePath))
         self.api = []
         self.__addGlobalsAPI()
         self.__addClassesAPI()
@@ -60,7 +60,7 @@
         """
         Private method to generate the api section for global variables. 
         """
-        moduleNameStr = "%s" % self.moduleName
+        moduleNameStr = "{0}".format(self.moduleName)
         
         for globalName in sorted(self.module.globals.keys()):
             if not self.__isPrivate(self.module.globals[globalName]):
@@ -70,7 +70,7 @@
                     id = Editor.AttributeProtectedID
                 else:
                     id = Editor.AttributePrivateID
-                self.api.append("%s%s?%d" % (moduleNameStr, globalName, id))
+                self.api.append("{0}{1}?{2:d}".format(moduleNameStr, globalName, id))
         
     def __addClassesAPI(self):
         """
@@ -98,11 +98,11 @@
                 id = Editor.ClassProtectedID
             else:
                 id = Editor.ClassPrivateID
-            self.api.append('%s%s?%d(%s)' % \
-                (self.moduleName, _class.name, id, 
+            self.api.append('{0}{1}?{2:d}({3})'.format(
+                self.moduleName, _class.name, id, 
                  ', '.join(_class.methods['__init__'].parameters[1:])))
             
-        classNameStr = "%s%s." % (self.moduleName, className)
+        classNameStr = "{0}{1}.".format(self.moduleName, className)
         for method in methods:
             if not self.__isPrivate(_class.methods[method]): 
                 if _class.methods[method].isPublic():
@@ -111,8 +111,8 @@
                     id = Editor.MethodProtectedID
                 else:
                     id = Editor.MethodPrivateID
-                self.api.append('%s%s?%d(%s)' % \
-                    (classNameStr, method, id, 
+                self.api.append('{0}{1}?{2:d}({3})'.format(
+                    classNameStr, method, id, 
                      ', '.join(_class.methods[method].parameters[1:])))
         
     def __addClassVariablesAPI(self, className):
@@ -122,7 +122,7 @@
         @param classname Name of the class containing the class variables. (string)
         """
         _class = self.module.classes[className]
-        classNameStr = "%s%s." % (self.moduleName, className)
+        classNameStr = "{0}{1}.".format(self.moduleName, className)
         for variable in sorted(_class.globals.keys()):
             if not self.__isPrivate(_class.globals[variable]): 
                 if _class.globals[variable].isPublic():
@@ -131,7 +131,7 @@
                     id = Editor.AttributeProtectedID
                 else:
                     id = Editor.AttributePrivateID
-                self.api.append('%s%s?%d' % (classNameStr, variable, id))
+                self.api.append('{0}{1}?{2:d}'.format(classNameStr, variable, id))
         
     def __addFunctionsAPI(self):
         """
@@ -146,6 +146,6 @@
                     id = Editor.MethodProtectedID
                 else:
                     id = Editor.MethodPrivateID
-                self.api.append('%s%s?%d(%s)' % \
-                    (self.moduleName, self.module.functions[funcName].name, id, 
+                self.api.append('{0}{1}?{2:d}({3})'.format(
+                    self.moduleName, self.module.functions[funcName].name, id, 
                      ', '.join(self.module.functions[funcName].parameters)))
--- a/DocumentationTools/IndexGenerator.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DocumentationTools/IndexGenerator.py	Mon Jul 26 15:45:23 2010 +0200
@@ -50,15 +50,16 @@
                 TemplatesListsStyleCSS.indexListModulesTemplate
             self.indexListEntryTemplate = TemplatesListsStyleCSS.indexListEntryTemplate
         else:
-            self.headerTemplate = TemplatesListsStyle.headerTemplate % colors
-            self.footerTemplate = TemplatesListsStyle.footerTemplate % colors
-            self.indexBodyTemplate = TemplatesListsStyle.indexBodyTemplate % colors
+            self.headerTemplate = TemplatesListsStyle.headerTemplate.format(**colors)
+            self.footerTemplate = TemplatesListsStyle.footerTemplate.format(**colors)
+            self.indexBodyTemplate = \
+                TemplatesListsStyle.indexBodyTemplate.format(**colors)
             self.indexListPackagesTemplate = \
-                TemplatesListsStyle.indexListPackagesTemplate % colors
+                TemplatesListsStyle.indexListPackagesTemplate.format(**colors)
             self.indexListModulesTemplate = \
-                TemplatesListsStyle.indexListModulesTemplate % colors
+                TemplatesListsStyle.indexListModulesTemplate.format(**colors)
             self.indexListEntryTemplate = \
-                TemplatesListsStyle.indexListEntryTemplate % colors
+                TemplatesListsStyle.indexListEntryTemplate.format(**colors)
         
     def remember(self, file, moduleDocument, basename=""):
         """
@@ -119,7 +120,7 @@
             f = os.path.join(self.outputDir, "index")
             title = "Table of contents"
         else:
-            f = os.path.join(self.outputDir, "index-%s" % packagename)
+            f = os.path.join(self.outputDir, "index-{0}".format(packagename))
             title = packagename
         
         filename = joinext(f, ".html")
@@ -133,15 +134,15 @@
             names = sorted(list(subpacks.keys()))
             lst = []
             for name in names:
-                link = joinext("index-%s" % name, ".html")
-                lst.append(self.indexListEntryTemplate % {
+                link = joinext("index-{0}".format(name), ".html")
+                lst.append(self.indexListEntryTemplate.format(**{
                     "Description" : subpacks[name],
                     "Name" : name.split(".")[-1],
                     "Link" : link,
-                })
-            subpackages = self.indexListPackagesTemplate % {
+                }))
+            subpackages = self.indexListPackagesTemplate.format(**{
                 "Entries" : "".join(lst),
-            }
+            })
             
         # 2) modules
         if package["modules"]:
@@ -153,24 +154,24 @@
                 nam = name.split(".")[-1]
                 if nam == "__init__":
                     nam = name.split(".")[-2]
-                lst.append(self.indexListEntryTemplate % {
+                lst.append(self.indexListEntryTemplate.format(**{
                     "Description" : mods[name],
                     "Name" : nam,
                     "Link" : link,
-                })
-            modules = self.indexListModulesTemplate % {
+                }))
+            modules = self.indexListModulesTemplate.format(**{
                 "Entries" : "".join(lst),
-            }
+            })
             
-        doc = self.headerTemplate % { \
+        doc = self.headerTemplate.format(**{ \
                 "Title" : title,
-                "Style" : self.stylesheet} + \
-              self.indexBodyTemplate % { \
+                "Style" : self.stylesheet}) + \
+              self.indexBodyTemplate.format(**{ \
                 "Title" : title,
                 "Description" : package["description"],
                 "Subpackages" : subpackages,
                 "Modules" : modules,
-              } + \
+              }) + \
               self.footerTemplate
     
         f = open(filename, "w", encoding = "utf-8", newline = newline)
@@ -195,17 +196,17 @@
         if basename:
             basename = basename.replace(os.sep, ".")
             if not basename.endswith("."):
-                basename = "%s." % basename
+                basename = "{0}.".format(basename)
         for package, element in list(self.packages.items()):
             try:
                 if basename:
                     package = package.replace(basename,"")
                 out = self.__writeIndex(package, element, newline)
             except IOError as v:
-                sys.stderr.write("%s error: %s\n" % (package, v[1]))
+                sys.stderr.write("{0} error: {1}\n".format(package, v[1]))
             else:
                 if out:
-                    sys.stdout.write("%s ok\n" % out)
+                    sys.stdout.write("{0} ok\n".format(out))
     
         sys.stdout.write("Indices written.\n")
         sys.stdout.flush()
--- a/DocumentationTools/ModuleDocumentor.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DocumentationTools/ModuleDocumentor.py	Mon Jul 26 15:45:23 2010 +0200
@@ -108,47 +108,56 @@
             self.seeLinkTemplate = TemplatesListsStyleCSS.seeLinkTemplate
             self.sinceInfoTemplate = TemplatesListsStyleCSS.sinceInfoTemplate
         else:
-            self.headerTemplate = TemplatesListsStyle.headerTemplate % colors
-            self.footerTemplate = TemplatesListsStyle.footerTemplate % colors
-            self.moduleTemplate = TemplatesListsStyle.moduleTemplate % colors
-            self.rbFileTemplate = TemplatesListsStyle.rbFileTemplate % colors
-            self.classTemplate = TemplatesListsStyle.classTemplate % colors
-            self.methodTemplate = TemplatesListsStyle.methodTemplate % colors
-            self.constructorTemplate = TemplatesListsStyle.constructorTemplate % colors
-            self.rbModuleTemplate = TemplatesListsStyle.rbModuleTemplate % colors
+            self.headerTemplate = TemplatesListsStyle.headerTemplate.format(**colors)
+            self.footerTemplate = TemplatesListsStyle.footerTemplate.format(**colors)
+            self.moduleTemplate = TemplatesListsStyle.moduleTemplate.format(**colors)
+            self.rbFileTemplate = TemplatesListsStyle.rbFileTemplate.format(**colors)
+            self.classTemplate = TemplatesListsStyle.classTemplate.format(**colors)
+            self.methodTemplate = TemplatesListsStyle.methodTemplate.format(**colors)
+            self.constructorTemplate = \
+                TemplatesListsStyle.constructorTemplate.format(**colors)
+            self.rbModuleTemplate = TemplatesListsStyle.rbModuleTemplate.format(**colors)
             self.rbModulesClassTemplate = \
-                TemplatesListsStyle.rbModulesClassTemplate % colors
-            self.functionTemplate = TemplatesListsStyle.functionTemplate % colors
-            self.listTemplate = TemplatesListsStyle.listTemplate % colors
-            self.listEntryTemplate = TemplatesListsStyle.listEntryTemplate % colors
+                TemplatesListsStyle.rbModulesClassTemplate.format(**colors)
+            self.functionTemplate = TemplatesListsStyle.functionTemplate.format(**colors)
+            self.listTemplate = TemplatesListsStyle.listTemplate.format(**colors)
+            self.listEntryTemplate = \
+                TemplatesListsStyle.listEntryTemplate.format(**colors)
             self.listEntryNoneTemplate = \
-                TemplatesListsStyle.listEntryNoneTemplate % colors
+                TemplatesListsStyle.listEntryNoneTemplate.format(**colors)
             self.listEntryDeprecatedTemplate = \
-                TemplatesListsStyle.listEntryDeprecatedTemplate % colors
+                TemplatesListsStyle.listEntryDeprecatedTemplate.format(**colors)
             self.listEntrySimpleTemplate = \
-                TemplatesListsStyle.listEntrySimpleTemplate % colors
-            self.paragraphTemplate = TemplatesListsStyle.paragraphTemplate % colors
+                TemplatesListsStyle.listEntrySimpleTemplate.format(**colors)
+            self.paragraphTemplate = \
+                TemplatesListsStyle.paragraphTemplate.format(**colors)
             self.parametersListTemplate = \
-                TemplatesListsStyle.parametersListTemplate % colors
+                TemplatesListsStyle.parametersListTemplate.format(**colors)
             self.parametersListEntryTemplate = \
-                TemplatesListsStyle.parametersListEntryTemplate % colors
-            self.returnsTemplate = TemplatesListsStyle.returnsTemplate % colors
+                TemplatesListsStyle.parametersListEntryTemplate.format(**colors)
+            self.returnsTemplate = TemplatesListsStyle.returnsTemplate.format(**colors)
             self.exceptionsListTemplate = \
-                TemplatesListsStyle.exceptionsListTemplate % colors
+                TemplatesListsStyle.exceptionsListTemplate.format(**colors)
             self.exceptionsListEntryTemplate = \
-                TemplatesListsStyle.exceptionsListEntryTemplate % colors
-            self.signalsListTemplate = TemplatesListsStyle.signalsListTemplate % colors
+                TemplatesListsStyle.exceptionsListEntryTemplate.format(**colors)
+            self.signalsListTemplate = \
+                TemplatesListsStyle.signalsListTemplate.format(**colors)
             self.signalsListEntryTemplate = \
-                TemplatesListsStyle.signalsListEntryTemplate % colors
-            self.eventsListTemplate = TemplatesListsStyle.eventsListTemplate % colors
+                TemplatesListsStyle.signalsListEntryTemplate.format(**colors)
+            self.eventsListTemplate = \
+                TemplatesListsStyle.eventsListTemplate.format(**colors)
             self.eventsListEntryTemplate = \
-                TemplatesListsStyle.eventsListEntryTemplate % colors
-            self.deprecatedTemplate = TemplatesListsStyle.deprecatedTemplate % colors
-            self.authorInfoTemplate = TemplatesListsStyle.authorInfoTemplate % colors
-            self.seeListTemplate = TemplatesListsStyle.seeListTemplate % colors
-            self.seeListEntryTemplate = TemplatesListsStyle.seeListEntryTemplate % colors
-            self.seeLinkTemplate = TemplatesListsStyle.seeLinkTemplate % colors
-            self.sinceInfoTemplate = TemplatesListsStyle.sinceInfoTemplate % colors
+                TemplatesListsStyle.eventsListEntryTemplate.format(**colors)
+            self.deprecatedTemplate = \
+                TemplatesListsStyle.deprecatedTemplate.format(**colors)
+            self.authorInfoTemplate = \
+                TemplatesListsStyle.authorInfoTemplate.format(**colors)
+            self.seeListTemplate = TemplatesListsStyle.seeListTemplate.format(**colors)
+            self.seeListEntryTemplate = \
+                TemplatesListsStyle.seeListEntryTemplate.format(**colors)
+            self.seeLinkTemplate = TemplatesListsStyle.seeLinkTemplate.format(**colors)
+            self.sinceInfoTemplate = \
+                TemplatesListsStyle.sinceInfoTemplate.format(**colors)
         
         self.keywords = []  # list of tuples containing the name (string) and 
                             # the ref (string). The ref is without the filename part.
@@ -196,9 +205,9 @@
         
         @return The source code documentation. (string)
         """
-        doc = self.headerTemplate % { \
+        doc = self.headerTemplate.format(**{ \
                 'Title' : self.module.name,
-                'Style' : self.stylesheet} + \
+                'Style' : self.stylesheet}) + \
               self.__genModuleSection() + \
               self.footerTemplate
         self.generated = True
@@ -216,7 +225,7 @@
         try:
             if self.module.type == RB_SOURCE:
                 rbModulesList = self.__genRbModulesListSection()
-                modBody = self.rbFileTemplate % { \
+                modBody = self.rbFileTemplate.format(**{ \
                     'Module' : self.module.name,
                     'ModuleDescription' : \
                         self.__formatDescription(self.module.description),
@@ -224,20 +233,20 @@
                     'ClassList' : classList,
                     'RbModulesList' : rbModulesList,
                     'FunctionList' : functionList,
-                }
+                })
             else:
-                modBody = self.moduleTemplate % { \
+                modBody = self.moduleTemplate.format(**{ \
                     'Module' : self.module.name,
                     'ModuleDescription' : \
                         self.__formatDescription(self.module.description),
                     'GlobalsList' : globalsList, 
                     'ClassList' : classList,
                     'FunctionList' : functionList,
-                }
+                })
         except TagError as e:
-            sys.stderr.write("Error in tags of description of module %s.\n" % \
-                self.module.name)
-            sys.stderr.write("%s\n" % e)
+            sys.stderr.write("Error in tags of description of module {0}.\n".format(
+                self.module.name))
+            sys.stderr.write("{0}\n".format(e))
             return ""
             
         classesSection = self.__genClassesSection()
@@ -246,7 +255,8 @@
             rbModulesSection = self.__genRbModulesSection()
         else:
             rbModulesSection = ""
-        return "%s%s%s%s" % (modBody, classesSection, rbModulesSection, functionsSection)
+        return "{0}{1}{2}{3}".format(
+            modBody, classesSection, rbModulesSection, functionsSection)
         
     def __genListSection(self, names, dict, kwSuffix = ""):
         """
@@ -259,18 +269,18 @@
         """
         lst = []
         for name in names:
-            lst.append(self.listEntryTemplate % { \
-                'Link' : "%s" % name,
+            lst.append(self.listEntryTemplate.format(**{ \
+                'Link' : "{0}".format(name),
                 'Name' : dict[name].name,
                 'Description' : self.__getShortDescription(dict[name].description),
                 'Deprecated' : self.__checkDeprecated(dict[name].description) and \
                     self.listEntryDeprecatedTemplate or "",
-            })
+            }))
             if kwSuffix:
-                n = "%s (%s)" % (name, kwSuffix)
+                n = "{0} ({1})".format(name, kwSuffix)
             else:
-                n = "%s" % name
-            self.keywords.append((n, "#%s" % name))
+                n = "{0}".format(name)
+            self.keywords.append((n, "#{0}".format(name)))
         return ''.join(lst)
         
     def __genGlobalsListSection(self, class_ = None):
@@ -287,12 +297,13 @@
             attrNames = sorted(self.module.globals.keys())
         if attrNames:
             s = ''.join(
-                [self.listEntrySimpleTemplate % {'Name' : name} for name in attrNames])
+                [self.listEntrySimpleTemplate.format(**{'Name' : name}) \
+                 for name in attrNames])
         else:
             s = self.listEntryNoneTemplate
-        return self.listTemplate % { \
+        return self.listTemplate.format(**{ \
             'Entries' : s,
-        }
+        })
         
     def __genClassListSection(self):
         """
@@ -306,9 +317,9 @@
             s = self.__genListSection(names, self.module.classes)
         else:
             s = self.listEntryNoneTemplate
-        return self.listTemplate % { \
+        return self.listTemplate.format(**{ \
             'Entries' : s,
-        }
+        })
         
     def __genRbModulesListSection(self):
         """
@@ -323,9 +334,9 @@
             s = self.__genListSection(names, self.module.modules)
         else:
             s = self.listEntryNoneTemplate
-        return self.listTemplate % { \
+        return self.listTemplate.format(**{ \
             'Entries' : s,
-        }
+        })
         
     def __genFunctionListSection(self):
         """
@@ -339,9 +350,9 @@
             s = self.__genListSection(names, self.module.functions)
         else:
             s = self.listEntryNoneTemplate
-        return self.listTemplate % { \
+        return self.listTemplate.format(**{ \
             'Entries' : s,
-        }
+        })
         
     def __genClassesSection(self):
         """
@@ -363,7 +374,7 @@
             methList, methBodies = self.__genMethodSection(_class, className)
             
             try:
-                clsBody = self.classTemplate % { \
+                clsBody = self.classTemplate.format(**{ \
                     'Anchor' : className,
                     'Class' : _class.name,
                     'ClassSuper' : supers,
@@ -371,11 +382,11 @@
                     'GlobalsList' : globalsList, 
                     'MethodList' : methList,
                     'MethodDetails' : methBodies,
-                }
+                })
             except TagError as e:
-                sys.stderr.write("Error in tags of description of class %s.\n" % \
-                    className)
-                sys.stderr.write("%s\n" % e)
+                sys.stderr.write("Error in tags of description of class {0}.\n".format(
+                    className))
+                sys.stderr.write("{0}\n".format(e))
                 clsBody = ""
             
             classes.append(clsBody)
@@ -394,28 +405,28 @@
         """
         lst = []
         try:
-            lst.append(self.listEntryTemplate % { \
-                'Link' : "%s.%s" % (className, '__init__'),
+            lst.append(self.listEntryTemplate.format(**{ \
+                'Link' : "{0}.{1}".format(className, '__init__'),
                 'Name' : clsName,
                 'Description' : self.__getShortDescription(dict['__init__'].description),
                 'Deprecated' : self.__checkDeprecated(dict['__init__'].description) and \
                                self.listEntryDeprecatedTemplate or "",
-            })
-            self.keywords.append(("%s (Constructor)" % className, 
-                                  "#%s.%s" % (className, '__init__')))
+            }))
+            self.keywords.append(("{0} (Constructor)".format(className), 
+                                  "#{0}.{1}".format(className, '__init__')))
         except KeyError:
             pass
             
         for name in names:
-            lst.append(self.listEntryTemplate % { \
-                'Link' : "%s.%s" % (className, name),
+            lst.append(self.listEntryTemplate.format(**{ \
+                'Link' : "{0}.{1}".format(className, name),
                 'Name' : dict[name].name,
                 'Description' : self.__getShortDescription(dict[name].description),
                 'Deprecated' : self.__checkDeprecated(dict[name].description) and \
                                self.listEntryDeprecatedTemplate or "",
-            })
-            self.keywords.append(("%s.%s" % (className, name), 
-                                  "#%s.%s" % (className, name)))
+            }))
+            self.keywords.append(("{0}.{1}".format(className, name), 
+                                  "#{0}.{1}".format(className, name)))
         return ''.join(lst)
         
     def __genMethodSection(self, obj, className):
@@ -432,35 +443,37 @@
         if '__init__' in methods:
             methods.remove('__init__')
             try:
-                methBody = self.constructorTemplate % { \
+                methBody = self.constructorTemplate.format(**{ \
                     'Anchor' : className,
                     'Class' : obj.name,
                     'Method' : '__init__',
                     'MethodDescription' : \
                         self.__formatDescription(obj.methods['__init__'].description),
                     'Params' : ', '.join(obj.methods['__init__'].parameters[1:]),
-                }
+                })
             except TagError as e:
-                sys.stderr.write("Error in tags of description of method %s.%s.\n" % \
-                    (className, '__init__'))
-                sys.stderr.write("%s\n" % e)
+                sys.stderr.write(
+                    "Error in tags of description of method {0}.{1}.\n".format(
+                    className, '__init__'))
+                sys.stderr.write("{0}\n".format(e))
                 methBody = ""
             methBodies.append(methBody)
             
         for method in methods:
             try:
-                methBody = self.methodTemplate % { \
+                methBody = self.methodTemplate.format(**{ \
                     'Anchor' : className,
                     'Class' : obj.name,
                     'Method' : obj.methods[method].name,
                     'MethodDescription' : \
                         self.__formatDescription(obj.methods[method].description),
                     'Params' : ', '.join(obj.methods[method].parameters[1:]),
-                }
+                })
             except TagError as e:
-                sys.stderr.write("Error in tags of description of method %s.%s.\n" % \
-                    (className, method))
-                sys.stderr.write("%s\n" % e)
+                sys.stderr.write(
+                    "Error in tags of description of method {0}.{1}.\n".format(
+                    className, method))
+                sys.stderr.write("{0}\n".format(e))
                 methBody = ""
             methBodies.append(methBody)
             
@@ -468,9 +481,9 @@
         
         if not methList:
             methList = self.listEntryNoneTemplate
-        return self.listTemplate % { \
+        return self.listTemplate.format(**{ \
             'Entries' : methList,
-            }, ''.join(methBodies)
+            }), ''.join(methBodies)
         
     def __genRbModulesSection(self):
         """
@@ -488,7 +501,7 @@
                 self.__genRbModulesClassesSection(rbModule, rbModuleName)
             
             try:
-                rbmBody = self.rbModuleTemplate % { \
+                rbmBody = self.rbModuleTemplate.format(**{ \
                     'Anchor' : rbModuleName,
                     'Module' : rbModule.name,
                     'ModuleDescription' : self.__formatDescription(rbModule.description),
@@ -497,11 +510,12 @@
                     'ClassesDetails' : classBodies,
                     'FunctionsList' : methList,
                     'FunctionsDetails' : methBodies,
-                }
+                })
             except TagError as e:
-                sys.stderr.write("Error in tags of description of Ruby module %s.\n" % \
-                    rbModuleName)
-                sys.stderr.write("%s\n" % e)
+                sys.stderr.write(
+                    "Error in tags of description of Ruby module {0}.\n".format(
+                    rbModuleName))
+                sys.stderr.write("{0}\n".format(e))
                 rbmBody = ""
             
             rbModules.append(rbmBody)
@@ -529,18 +543,18 @@
             methList, methBodies = self.__genMethodSection(_class, className)
             
             try:
-                clsBody = self.rbModulesClassTemplate % { \
+                clsBody = self.rbModulesClassTemplate.format(**{ \
                     'Anchor' : className,
                     'Class' : _class.name,
                     'ClassSuper' : supers,
                     'ClassDescription' : self.__formatDescription(_class.description),
                     'MethodList' : methList,
                     'MethodDetails' : methBodies,
-                }
+                })
             except TagError as e:
-                sys.stderr.write("Error in tags of description of class %s.\n" % \
-                    className)
-                sys.stderr.write("%s\n" % e)
+                sys.stderr.write("Error in tags of description of class {0}.\n".format(
+                    className))
+                sys.stderr.write("{0}\n".format(e))
                 clsBody = ""
             
             classes.append(clsBody)
@@ -551,9 +565,9 @@
         
         if not classesList:
             classesList = self.listEntryNoneTemplate
-        return self.listTemplate % { \
+        return self.listTemplate.format(**{ \
             'Entries' : classesList,
-            }, ''.join(classes)
+            }), ''.join(classes)
         
     def __genRbModulesClassesListSection(self, names, dict, moduleName):
         """
@@ -566,15 +580,15 @@
         """
         lst = []
         for name in names:
-            lst.append(self.listEntryTemplate % { \
-                'Link' : "%s.%s" % (moduleName, name),
+            lst.append(self.listEntryTemplate.format(**{ \
+                'Link' : "{0}.{1}".format(moduleName, name),
                 'Name' : dict[name].name,
                 'Description' : self.__getShortDescription(dict[name].description),
                 'Deprecated' : self.__checkDeprecated(dict[name].description) and \
                                self.listEntryDeprecatedTemplate or "",
-            })
-            self.keywords.append(("%s.%s" % (moduleName, name), 
-                                  "#%s.%s" % (moduleName, name)))
+            }))
+            self.keywords.append(("{0}.{1}".format(moduleName, name), 
+                                  "#{0}.{1}".format(moduleName, name)))
         return ''.join(lst)
         
     def __genFunctionsSection(self):
@@ -587,17 +601,17 @@
         funcNames = sorted(list(self.module.functions.keys()))
         for funcName in funcNames:
             try:
-                funcBody = self.functionTemplate % { \
+                funcBody = self.functionTemplate.format(**{ \
                     'Anchor' : funcName,
                     'Function' : self.module.functions[funcName].name,
                     'FunctionDescription' : self.__formatDescription(\
                         self.module.functions[funcName].description),
                     'Params' : ', '.join(self.module.functions[funcName].parameters),
-                }
+                })
             except TagError as e:
-                sys.stderr.write("Error in tags of description of function %s.\n" % \
-                    funcName)
-                sys.stderr.write("%s\n" % e)
+                sys.stderr.write("Error in tags of description of function {0}.\n".format(
+                    funcName))
+                sys.stderr.write("{0}\n".format(e))
                 funcBody = ""
             
             funcBodies.append(funcBody)
@@ -678,14 +692,14 @@
                 else:
                     linelist.append(html_uencode(line))
             else:
-                lst.append(self.paragraphTemplate % { \
+                lst.append(self.paragraphTemplate.format(**{ \
                     'Lines' : '\n'.join(linelist)
-                })
+                }))
                 linelist = []
         if linelist:
-            lst.append(self.paragraphTemplate % { \
+            lst.append(self.paragraphTemplate.format(**{ \
                 'Lines' : '\n'.join(linelist)
-            })
+            }))
         return ''.join(lst)
         
     def __genDescriptionListSection(self, dictionary, template):
@@ -700,10 +714,10 @@
         lst = []
         keys = sorted(list(dictionary.keys()))
         for key in keys:
-            lst.append(template % { \
+            lst.append(template.format(**{ \
                 'Name' : key,
                 'Description' : html_uencode('\n'.join(dictionary[key])),
-            })
+            }))
         return ''.join(lst)
         
     def __genParamDescriptionListSection(self, _list, template):
@@ -717,10 +731,10 @@
         """
         lst = []
         for name, lines in _list:
-            lst.append(template % { \
+            lst.append(template.format(**{ \
                 'Name' : name,
                 'Description' : html_uencode('\n'.join(lines)),
-            })
+            }))
         return ''.join(lst)
         
     def __formatCrossReferenceEntry(self, entry):
@@ -747,14 +761,14 @@
             except ValueError:
                 path = reference
                 anchor = ''
-            reference = path and "%s.html" % path or ''
+            reference = path and "{0}.html".format(path) or ''
             if anchor:
-                reference = "%s#%s" % (reference, anchor)
-            entry = 'href="%s">%s</a>' % (reference, label)
+                reference = "{0}#{1}".format(reference, anchor)
+            entry = 'href="{0}">{1}</a>'.format(reference, label)
         
-        return self.seeLinkTemplate % { \
+        return self.seeLinkTemplate.format(**{ \
             'Link' : entry,
-        }
+        })
         
     def __genSeeListSection(self, _list, template):
         """
@@ -767,9 +781,9 @@
         lst = []
         for seeEntry in _list:
             seeEntryString = ''.join(seeEntry)
-            lst.append(template % { \
+            lst.append(template.format(**{ \
                 'Link' : html_uencode(self.__formatCrossReferenceEntry(seeEntryString)),
-            })
+            }))
         return '\n'.join(lst)
         
     def __processInlineTags(self, desc):
@@ -783,21 +797,21 @@
         while start != -1:
             stop = desc.find('}', start + 2)
             if stop == -1:
-                raise TagError("Unterminated inline tag.\n%s" % desc)
+                raise TagError("Unterminated inline tag.\n{0}".format(desc))
             
             tagText = desc[start + 1:stop]
             if tagText.startswith('@link'):
                 parts = tagText.split(None, 1)
                 if len(parts) < 2:
-                    raise TagError("Wrong format in inline tag %s.\n%s" % \
-                                    (parts[0], desc))
+                    raise TagError("Wrong format in inline tag {0}.\n{1}".format(
+                                   parts[0], desc))
                 
                 formattedTag = self.__formatCrossReferenceEntry(parts[1])
-                desc = desc.replace("{%s}" % tagText, formattedTag)
+                desc = desc.replace("{{{0}}}".format(tagText), formattedTag)
             else:
                 tag = tagText.split(None, 1)[0]
-                raise TagError("Unknown inline tag encountered, %s.\n%s" % \
-                                (tag, desc))
+                raise TagError("Unknown inline tag encountered, {0}.\n{1}".format(
+                               tag, desc))
             
             start = desc.find('{@')
         
@@ -839,7 +853,7 @@
                     inTagSection = True
                     parts = desc.split(None, 2)
                     if len(parts) < 2:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     paramName = parts[1]
                     if parts[0] == "@keyparam":
                         paramName += '='
@@ -852,7 +866,7 @@
                     inTagSection = True
                     parts = desc.split(None, 1)
                     if len(parts) < 2:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     returns = [parts[1]]
                     lastItem = returns
                 elif desc.startswith("@exception") or \
@@ -861,7 +875,7 @@
                     inTagSection = True
                     parts = desc.split(None, 2)
                     if len(parts) < 2:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     excName = parts[1]
                     try:
                         exceptionDict[excName] = [parts[2]]
@@ -872,7 +886,7 @@
                     inTagSection = True
                     m = _signal(desc,0)
                     if m is None:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     signalName = 1 and m.group("SignalName1") \
                                    or m.group("SignalName2")
                     signalDesc = 1 and m.group("SignalDescription1") \
@@ -885,7 +899,7 @@
                     inTagSection = True
                     m = _event(desc,0)
                     if m is None:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     eventName = 1 and m.group("EventName1") \
                                    or m.group("EventName2")
                     eventDesc = 1 and m.group("EventDescription1") \
@@ -898,35 +912,35 @@
                     inTagSection = True
                     parts = desc.split(None, 1)
                     if len(parts) < 2:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     deprecated = [parts[1]]
                     lastItem = deprecated
                 elif desc.startswith("@author"):
                     inTagSection = True
                     parts = desc.split(None, 1)
                     if len(parts) < 2:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     authorInfo = [parts[1]]
                     lastItem = authorInfo
                 elif desc.startswith("@since"):
                     inTagSection = True
                     parts = desc.split(None, 1)
                     if len(parts) < 2:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     sinceInfo = [parts[1]]
                     lastItem = sinceInfo
                 elif desc.startswith("@see"):
                     inTagSection = True
                     parts = desc.split(None, 1)
                     if len(parts) < 2:
-                        raise TagError("Wrong format in %s line.\n" % parts[0])
+                        raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     seeList.append([parts[1]])
                     lastItem = seeList[-1]
                 elif desc.startswith("@@"):
                     lastItem.append(desc[1:])
                 elif desc.startswith("@"):
                     tag = desc.split(None, 1)[0]
-                    raise TagError("Unknown tag encountered, %s.\n" % tag)
+                    raise TagError("Unknown tag encountered, {0}.\n".format(tag))
                 else:
                     lastItem.append(ditem)
             elif not inTagSection:
@@ -938,71 +952,71 @@
             description = ""
         
         if paramList:
-            parameterSect = self.parametersListTemplate % { \
+            parameterSect = self.parametersListTemplate.format(**{ \
                 'Parameters' : self.__genParamDescriptionListSection(paramList,
                                self.parametersListEntryTemplate)
-            }
+            })
         else:
             parameterSect = ""
         
         if returns:
-            returnSect = self.returnsTemplate % html_uencode('\n'.join(returns))
+            returnSect = self.returnsTemplate.format(html_uencode('\n'.join(returns)))
         else:
             returnSect = ""
         
         if exceptionDict:
-            exceptionSect = self.exceptionsListTemplate % { \
+            exceptionSect = self.exceptionsListTemplate.format(**{ \
                 'Exceptions' : self.__genDescriptionListSection(exceptionDict,
                                self.exceptionsListEntryTemplate)
-            }
+            })
         else:
             exceptionSect = ""
         
         if signalDict:
-            signalSect = self.signalsListTemplate % { \
+            signalSect = self.signalsListTemplate.format(**{ \
                 'Signals' : self.__genDescriptionListSection(signalDict,
                                self.signalsListEntryTemplate)
-            }
+            })
         else:
             signalSect = ""
         
         if eventDict:
-            eventSect = self.eventsListTemplate % { \
+            eventSect = self.eventsListTemplate.format(**{ \
                 'Events' : self.__genDescriptionListSection(eventDict,
                                self.eventsListEntryTemplate)
-            }
+            })
         else:
             eventSect = ""
         
         if deprecated:
-            deprecatedSect = self.deprecatedTemplate % { \
+            deprecatedSect = self.deprecatedTemplate.format(**{ \
                 'Lines' : html_uencode('\n'.join(deprecated)),
-            }
+            })
         else:
             deprecatedSect = ""
         
         if authorInfo:
-            authorInfoSect = self.authorInfoTemplate % { \
+            authorInfoSect = self.authorInfoTemplate.format(**{ \
                 'Authors' : html_uencode('\n'.join(authorInfo)),
-            }
+            })
         else:
             authorInfoSect = ""
         
         if sinceInfo:
-            sinceInfoSect = self.sinceInfoTemplate % { \
+            sinceInfoSect = self.sinceInfoTemplate.format(**{ \
                 'Info' : html_uencode(sinceInfo[0]),
-            }
+            })
         else:
             sinceInfoSect = ""
         
         if seeList:
-            seeSect = self.seeListTemplate % { \
+            seeSect = self.seeListTemplate.format(**{ \
                 'Links' : self.__genSeeListSection(seeList, self.seeListEntryTemplate),
-            }
+            })
         else:
             seeSect = ''
         
-        return "%s%s%s%s%s%s%s%s%s%s" % ( \
+        return "{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}".format(
             deprecatedSect, description, parameterSect, returnSect,
             exceptionSect, signalSect, eventSect, authorInfoSect,
             seeSect, sinceInfoSect
--- a/DocumentationTools/QtHelpGenerator.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DocumentationTools/QtHelpGenerator.py	Mon Jul 26 15:45:23 2010 +0200
@@ -19,7 +19,7 @@
 <QHelpCollectionProject version="1.0">
   <docFiles>
     <register>
-      <file>%(helpfile)s</file>
+      <file>{helpfile}</file>
     </register>
   </docFiles>
 </QHelpCollectionProject>
@@ -27,21 +27,21 @@
 
 HelpProject = r"""<?xml version="1.0" encoding="UTF-8"?>
 <QtHelpProject version="1.0">
-  <namespace>%(namespace)s</namespace>
-  <virtualFolder>%(folder)s</virtualFolder>
-  <customFilter name="%(filter_name)s">
-%(filter_attributes)s
+  <namespace>{namespace}</namespace>
+  <virtualFolder>{folder}</virtualFolder>
+  <customFilter name="{filter_name}">
+{filter_attributes}
   </customFilter>
   <filterSection>
-%(filter_attributes)s
+{filter_attributes}
     <toc>
-%(sections)s
+{sections}
     </toc>
     <keywords>
-%(keywords)s
+{keywords}
     </keywords>
     <files>
-%(files)s
+{files}
     </files>
   </filterSection>
 </QtHelpProject>
@@ -125,8 +125,8 @@
                 "modules" : {}
             }
             
-            kwEntry = ("%s (Package)" % package.split('.')[-1], 
-                       joinext("index-%s" % package, ".html"))
+            kwEntry = ("{0} (Package)".format(package.split('.')[-1]), 
+                       joinext("index-{0}".format(package), ".html"))
             if kwEntry not in self.keywords:
                 self.keywords.append(kwEntry)
             
@@ -141,12 +141,13 @@
         elt["modules"][moduleDocument.name()] = moduleDocument.name()
         
         if "__init__" not in file:
-            kwEntry = ("%s (Module)" % moduleDocument.name().split('.')[-1], 
+            kwEntry = ("{0} (Module)".format(moduleDocument.name().split('.')[-1]), 
                        joinext(moduleDocument.name(), ".html"))
             if kwEntry not in self.keywords:
                 self.keywords.append(kwEntry)
         for kw in moduleDocument.getQtHelpKeywords():
-            kwEntry = (kw[0], "%s%s" % (joinext(moduleDocument.name(), ".html"), kw[1]))
+            kwEntry = (kw[0], "{0}{1}".format(
+                joinext(moduleDocument.name(), ".html"), kw[1]))
             if kwEntry not in self.keywords:
                 self.keywords.append(kwEntry)
     
@@ -160,17 +161,17 @@
         """
         indent = level * '  '
         indent1 = indent + '  '
-        s  = indent + '<section title="%s" ref="%s">\n' % \
-            (package == "00index" and self.title or package, 
+        s  = indent + '<section title="{0}" ref="{1}">\n'.format(
+            package == "00index" and self.title or package, 
              package == "00index" and \
                 joinext("index", ".html") or \
-                joinext("index-%s" % package, ".html"))
+                joinext("index-{0}".format(package), ".html"))
         for subpack in sorted(self.packages[package]["subpackages"]):
             s += self.__generateSections(subpack, level + 1)
             s += '\n'
         for mod in sorted(self.packages[package]["modules"]):
-            s += indent1 + '<section title="%s" ref="%s" />\n' % \
-                (mod, joinext(mod, ".html"))
+            s += indent1 + '<section title="{0}" ref="{1}" />\n'.format(
+                mod, joinext(mod, ".html"))
         s += indent + '</section>'
         return s
     
@@ -209,16 +210,16 @@
         if basename:
             basename = basename.replace(os.sep, ".")
             if not basename.endswith("."):
-                basename = "%s." % basename
+                basename = "{0}.".format(basename)
         
         sections = self.__generateSections("00index", 3)
         filesList = sorted([e for e in os.listdir(self.htmlDir) if e.endswith('.html')])
-        files = "\n".join(["      <file>%s</file>" % f for f in filesList])
-        filterAttribs = "\n".join(["    <filterAttribute>%s</filterAttribute>" % a \
+        files = "\n".join(["      <file>{0}</file>".format(f) for f in filesList])
+        filterAttribs = "\n".join(["    <filterAttribute>{0}</filterAttribute>".format(a) \
                                   for a in self.filterAttributes])
         keywords = "\n".join(
-            ['      <keyword name="%s" id="%s" ref="%s" />' % \
-             (html_encode(kw[0]), html_encode(kw[0]), html_encode(kw[1])) \
+            ['      <keyword name="{0}" id="{1}" ref="{2}" />'.format(
+             html_encode(kw[0]), html_encode(kw[0]), html_encode(kw[1])) \
              for kw in self.keywords])
         
         helpAttribs = {
@@ -231,7 +232,7 @@
             "files" : files, 
         }
         
-        txt = self.__convertEol(HelpProject % helpAttribs, newline)
+        txt = self.__convertEol(HelpProject.format(**helpAttribs), newline)
         f = codecs.open(os.path.join(self.outputDir, HelpProjectFile), 'w', 'utf-8')
         f.write(txt)
         f.close()
@@ -242,7 +243,7 @@
                 "helpfile" : HelpHelpFile, 
             }
             
-            txt = self.__convertEol(HelpCollection % collectionAttribs, newline)
+            txt = self.__convertEol(HelpCollection.format(**collectionAttribs), newline)
             f = codecs.open(os.path.join(self.outputDir, HelpCollectionProjectFile), 
                             'w', 'utf-8')
             f.write(txt)
--- a/DocumentationTools/TemplatesListsStyle.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DocumentationTools/TemplatesListsStyle.py	Mon Jul 26 15:45:23 2010 +0200
@@ -16,9 +16,9 @@
 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
 <html><head>
-<title>%%(Title)s</title>
+<title>{{Title}}</title>
 </head>
-<body style="background-color:%(BodyBgColor)s;color:%(BodyColor)s">'''
+<body style="background-color:{BodyBgColor};color:{BodyColor}">'''
 
 footerTemplate = '''
 </body></html>'''
@@ -29,104 +29,104 @@
 
 moduleTemplate = \
 '''<a NAME="top" ID="top"></a>
-<h1 style="background-color:%(Level1HeaderBgColor)s;color:%(Level1HeaderColor)s">%%(Module)s</h1>
-%%(ModuleDescription)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Global Attributes</h3>
-%%(GlobalsList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Classes</h3>
-%%(ClassList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Functions</h3>
-%%(FunctionList)s
+<h1 style="background-color:{Level1HeaderBgColor};color:{Level1HeaderColor}">{{Module}}</h1>
+{{ModuleDescription}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Global Attributes</h3>
+{{GlobalsList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Classes</h3>
+{{ClassList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Functions</h3>
+{{FunctionList}}
 <hr />'''
 
 rbFileTemplate = \
 '''<a NAME="top" ID="top"></a>
-<h1 style="background-color:%(Level1HeaderBgColor)s;color:%(Level1HeaderColor)s">%%(Module)s</h1>
-%%(ModuleDescription)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Global Attributes</h3>
-%%(GlobalsList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Classes</h3>
-%%(ClassList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Modules</h3>
-%%(RbModulesList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Functions</h3>
-%%(FunctionList)s
+<h1 style="background-color:{Level1HeaderBgColor};color:{Level1HeaderColor}">{{Module}}</h1>
+{{ModuleDescription}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Global Attributes</h3>
+{{GlobalsList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Classes</h3>
+{{ClassList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Modules</h3>
+{{RbModulesList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Functions</h3>
+{{FunctionList}}
 <hr />'''
 
 classTemplate = \
 '''<hr />
-<a NAME="%%(Anchor)s" ID="%%(Anchor)s"></a>
-<h2 style="background-color:%(CFBgColor)s;color:%(CFColor)s">%%(Class)s</h2>
-%%(ClassDescription)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Derived from</h3>
-%%(ClassSuper)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Class Attributes</h3>
-%%(GlobalsList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Methods</h3>
-%%(MethodList)s
-%%(MethodDetails)s
-<div align="right"><a style="color:%(LinkColor)s" href="#top">Up</a></div>
+<a NAME="{{Anchor}}" ID="{{Anchor}}"></a>
+<h2 style="background-color:{CFBgColor};color:{CFColor}">{{Class}}</h2>
+{{ClassDescription}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Derived from</h3>
+{{ClassSuper}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Class Attributes</h3>
+{{GlobalsList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Methods</h3>
+{{MethodList}}
+{{MethodDetails}}
+<div align="right"><a style="color:{LinkColor}" href="#top">Up</a></div>
 <hr />'''
 
 methodTemplate = \
-'''<a NAME="%%(Anchor)s.%%(Method)s" ID="%%(Anchor)s.%%(Method)s"></a>
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">%%(Class)s.%%(Method)s</h3>
-<b>%%(Method)s</b>(<i>%%(Params)s</i>)
-%%(MethodDescription)s'''
+'''<a NAME="{{Anchor}}.{{Method}}" ID="{{Anchor}}.{{Method}}"></a>
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">{{Class}}.{{Method}}</h3>
+<b>{{Method}}</b>(<i>{{Params}}</i>)
+{{MethodDescription}}'''
 
 constructorTemplate = \
-'''<a NAME="%%(Anchor)s.%%(Method)s" ID="%%(Anchor)s.%%(Method)s"></a>
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">%%(Class)s (Constructor)</h3>
-<b>%%(Class)s</b>(<i>%%(Params)s</i>)
-%%(MethodDescription)s'''
+'''<a NAME="{{Anchor}}.{{Method}}" ID="{{Anchor}}.{{Method}}"></a>
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">{{Class}} (Constructor)</h3>
+<b>{{Class}}</b>(<i>{{Params}}</i>)
+{{MethodDescription}}'''
 
 rbModuleTemplate = \
 '''<hr />
-<a NAME="%%(Anchor)s" ID="%%(Anchor)s"></a>
-<h2 style="background-color:%(CFBgColor)s;color:%(CFColor)s">%%(Module)s</h2>
-%%(ModuleDescription)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Module Attributes</h3>
-%%(GlobalsList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Classes</h3>
-%%(ClassesList)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Functions</h3>
-%%(FunctionsList)s
+<a NAME="{{Anchor}}" ID="{{Anchor}}"></a>
+<h2 style="background-color:{CFBgColor};color:{CFColor}">{{Module}}</h2>
+{{ModuleDescription}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Module Attributes</h3>
+{{GlobalsList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Classes</h3>
+{{ClassesList}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Functions</h3>
+{{FunctionsList}}
 <hr />
-%%(ClassesDetails)s
-%%(FunctionsDetails)s
-<div align="right"><a style="color:%(LinkColor)s" href="#top">Up</a></div>
+{{ClassesDetails}}
+{{FunctionsDetails}}
+<div align="right"><a style="color:{LinkColor}" href="#top">Up</a></div>
 <hr />'''
 
 rbModulesClassTemplate = \
-'''<a NAME="%%(Anchor)s" ID="%%(Anchor)s"></a>
-<h2 style="background-color:%(CFBgColor)s;color:%(CFColor)s">%%(Class)s</h2>
-%%(ClassDescription)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Derived from</h3>
-%%(ClassSuper)s
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Methods</h3>
-%%(MethodList)s
-%%(MethodDetails)s
-<div align="right"><a style="color:%(LinkColor)s" href="#top">Up</a></div>
+'''<a NAME="{{Anchor}}" ID="{{Anchor}}"></a>
+<h2 style="background-color:{CFBgColor};color:{CFColor}">{{Class}}</h2>
+{{ClassDescription}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Derived from</h3>
+{{ClassSuper}}
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Methods</h3>
+{{MethodList}}
+{{MethodDetails}}
+<div align="right"><a style="color:{LinkColor}" href="#top">Up</a></div>
 <hr />'''
 
 functionTemplate = \
 '''<hr />
-<a NAME="%%(Anchor)s" ID="%%(Anchor)s"></a>
-<h2 style="background-color:%(CFBgColor)s;color:%(CFColor)s">%%(Function)s</h2>
-<b>%%(Function)s</b>(<i>%%(Params)s</i>)
-%%(FunctionDescription)s
-<div align="right"><a style="color:%(LinkColor)s" href="#top">Up</a></div>
+<a NAME="{{Anchor}}" ID="{{Anchor}}"></a>
+<h2 style="background-color:{CFBgColor};color:{CFColor}">{{Function}}</h2>
+<b>{{Function}}</b>(<i>{{Params}}</i>)
+{{FunctionDescription}}
+<div align="right"><a style="color:{LinkColor}" href="#top">Up</a></div>
 <hr />'''
 
 listTemplate = \
 '''<table>
-%%(Entries)s
+{{Entries}}
 </table>'''
 
 listEntryTemplate = \
 '''<tr>
-<td><a style="color:%(LinkColor)s" href="#%%(Link)s">%%(Name)s</a></td>
-<td>%%(Deprecated)s%%(Description)s</td>
+<td><a style="color:{LinkColor}" href="#{{Link}}">{{Name}}</a></td>
+<td>{{Deprecated}}{{Description}}</td>
 </tr>'''
 
 listEntryNoneTemplate = \
@@ -136,22 +136,22 @@
 '''<b>Deprecated.</b>'''
 
 listEntrySimpleTemplate = \
-'''<tr><td>%%(Name)s</td></tr>'''
+'''<tr><td>{{Name}}</td></tr>'''
 
 paragraphTemplate = \
 '''<p>
-%%(Lines)s
+{{Lines}}
 </p>'''
 
 parametersListTemplate = \
 '''<dl>
-%%(Parameters)s
+{{Parameters}}
 </dl>'''
 
 parametersListEntryTemplate = \
-'''<dt><i>%%(Name)s</i></dt>
+'''<dt><i>{{Name}}</i></dt>
 <dd>
-%%(Description)s
+{{Description}}
 </dd>'''
 
 returnsTemplate = \
@@ -164,68 +164,68 @@
 
 exceptionsListTemplate = \
 '''<dl>
-%%(Exceptions)s
+{{Exceptions}}
 </dl>'''
 
 exceptionsListEntryTemplate = \
-'''<dt>Raises <b>%%(Name)s</b>:</dt>
+'''<dt>Raises <b>{{Name}}</b>:</dt>
 <dd>
-%%(Description)s
+{{Description}}
 </dd>'''
 
 signalsListTemplate = \
 '''<h4>Signals</h4>
 <dl>
-%%(Signals)s
+{{Signals}}
 </dl>'''
 
 signalsListEntryTemplate = \
-'''<dt>%%(Name)s</dt>
+'''<dt>{{Name}}</dt>
 <dd>
-%%(Description)s
+{{Description}}
 </dd>'''
 
 eventsListTemplate = \
 '''<h4>Events</h4>
 <dl>
-%%(Events)s
+{{Events}}
 </dl>'''
 
 eventsListEntryTemplate = \
-'''<dt>%%(Name)s</dt>
+'''<dt>{{Name}}</dt>
 <dd>
-%%(Description)s
+{{Description}}
 </dd>'''
 
 deprecatedTemplate = \
 '''<p>
 <b>Deprecated.</b>
-%%(Lines)s
+{{Lines}}
 </p>'''
 
 authorInfoTemplate = \
 '''<p>
 <i>Author(s)</i>:
-%%(Authors)s
+{{Authors}}
 </p>'''
 
 seeListTemplate = \
 '''<dl>
 <dt><b>See Also:</b></dt>
-%%(Links)s
+{{Links}}
 </dl>'''
 
 seeListEntryTemplate = \
 '''<dd>
-%%(Link)s
+{{Link}}
 </dd>'''
 
 seeLinkTemplate = \
-'''<a style="color:%(LinkColor)s" %%(Link)s'''
+'''<a style="color:{LinkColor}" {{Link}}'''
 
 sinceInfoTemplate = \
 '''<p>
-<b>since</b> %%(Info)s
+<b>since</b> {{Info}}
 </p>'''
 
 #################################
@@ -233,25 +233,25 @@
 #################################
 
 indexBodyTemplate = '''
-<h1 style="background-color:%(Level1HeaderBgColor)s;color:%(Level1HeaderColor)s">%%(Title)s</h1>
-%%(Description)s
-%%(Subpackages)s
-%%(Modules)s'''
+<h1 style="background-color:{Level1HeaderBgColor};color:{Level1HeaderColor}">{{Title}}</h1>
+{{Description}}
+{{Subpackages}}
+{{Modules}}'''
 
 indexListPackagesTemplate = '''
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Packages</h3>
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Packages</h3>
 <table>
-%%(Entries)s
+{{Entries}}
 </table>'''
 
 indexListModulesTemplate = '''
-<h3 style="background-color:%(Level2HeaderBgColor)s;color:%(Level2HeaderColor)s">Modules</h3>
+<h3 style="background-color:{Level2HeaderBgColor};color:{Level2HeaderColor}">Modules</h3>
 <table>
-%%(Entries)s
+{{Entries}}
 </table>'''
 
 indexListEntryTemplate = \
 '''<tr>
-<td><a style="color:%(LinkColor)s" href="%%(Link)s">%%(Name)s</a></td>
-<td>%%(Description)s</td>
+<td><a style="color:{LinkColor}" href="{{Link}}">{{Name}}</a></td>
+<td>{{Description}}</td>
 </tr>'''
--- a/DocumentationTools/TemplatesListsStyleCSS.py	Sun Jul 25 17:08:39 2010 +0200
+++ b/DocumentationTools/TemplatesListsStyleCSS.py	Mon Jul 26 15:45:23 2010 +0200
@@ -16,9 +16,9 @@
 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
 <html><head>
-<title>%(Title)s</title>
+<title>{Title}</title>
 <style>
-%(Style)s
+{Style}
 </style>
 </head>
 <body>'''
@@ -32,104 +32,104 @@
 
 moduleTemplate = \
 '''<a NAME="top" ID="top"></a>
-<h1>%(Module)s</h1>
-%(ModuleDescription)s
+<h1>{Module}</h1>
+{ModuleDescription}
 <h3>Global Attributes</h3>
-%(GlobalsList)s
+{GlobalsList}
 <h3>Classes</h3>
-%(ClassList)s
+{ClassList}
 <h3>Functions</h3>
-%(FunctionList)s
+{FunctionList}
 <hr />'''
 
 rbFileTemplate = \
 '''<a NAME="top" ID="top"></a>
-<h1>%(Module)s</h1>
-%(ModuleDescription)s
+<h1>{Module}</h1>
+{ModuleDescription}
 <h3>Global Attributes</h3>
-%(GlobalsList)s
+{GlobalsList}
 <h3>Classes</h3>
-%(ClassList)s
+{ClassList}
 <h3>Modules</h3>
-%(RbModulesList)s
+{RbModulesList}
 <h3>Functions</h3>
-%(FunctionList)s
+{FunctionList}
 <hr />'''
 
 classTemplate = \
 '''<hr />
-<a NAME="%(Anchor)s" ID="%(Anchor)s"></a>
-<h2>%(Class)s</h2>
-%(ClassDescription)s
+<a NAME="{Anchor}" ID="{Anchor}"></a>
+<h2>{Class}</h2>
+{ClassDescription}
 <h3>Derived from</h3>
-%(ClassSuper)s
+{ClassSuper}
 <h3>Class Attributes</h3>
-%(GlobalsList)s
+{GlobalsList}
 <h3>Methods</h3>
-%(MethodList)s
-%(MethodDetails)s
+{MethodList}
+{MethodDetails}
 <div align="right"><a href="#top">Up</a></div>
 <hr />'''
 
 methodTemplate = \
-'''<a NAME="%(Anchor)s.%(Method)s" ID="%(Anchor)s.%(Method)s"></a>
-<h4>%(Class)s.%(Method)s</h4>
-<b>%(Method)s</b>(<i>%(Params)s</i>)
-%(MethodDescription)s'''
+'''<a NAME="{Anchor}.{Method}" ID="{Anchor}.{Method}"></a>
+<h4>{Class}.{Method}</h4>
+<b>{Method}</b>(<i>{Params}</i>)
+{MethodDescription}'''
 
 constructorTemplate = \
-'''<a NAME="%(Anchor)s.%(Method)s" ID="%(Anchor)s.%(Method)s"></a>
-<h4>%(Class)s (Constructor)</h4>
-<b>%(Class)s</b>(<i>%(Params)s</i>)
-%(MethodDescription)s'''
+'''<a NAME="{Anchor}.{Method}" ID="{Anchor}.{Method}"></a>
+<h4>{Class} (Constructor)</h4>
+<b>{Class}</b>(<i>{Params}</i>)
+{MethodDescription}'''
 
 rbModuleTemplate = \
 '''<hr />
-<a NAME="%(Anchor)s" ID="%(Anchor)s"></a>
-<h2>%(Module)s</h2>
-%(ModuleDescription)s
+<a NAME="{Anchor}" ID="{Anchor}"></a>
+<h2>{Module}</h2>
+{ModuleDescription}
 <h3>Module Attributes</h3>
-%(GlobalsList)s
+{GlobalsList}
 <h3>Classes</h3>
-%(ClassesList)s
+{ClassesList}
 <h3>Functions</h3>
-%(FunctionsList)s
+{FunctionsList}
 <hr />
-%(ClassesDetails)s
-%(FunctionsDetails)s
+{ClassesDetails}
+{FunctionsDetails}
 <div align="right"><a href="#top">Up</a></div>
 <hr />'''
 
 rbModulesClassTemplate = \
-'''<a NAME="%(Anchor)s" ID="%(Anchor)s"></a>
-<h2>%(Class)s</h2>
-%(ClassDescription)s
+'''<a NAME="{Anchor}" ID="{Anchor}"></a>
+<h2>{Class}</h2>
+{ClassDescription}
 <h3>Derived from</h3>
-%(ClassSuper)s
+{ClassSuper}
 <h3>Methods</h3>
-%(MethodList)s
-%(MethodDetails)s
+{MethodList}
+{MethodDetails}
 <div align="right"><a href="#top">Up</a></div>
 <hr />'''
 
 functionTemplate = \
 '''<hr />
-<a NAME="%(Anchor)s" ID="%(Anchor)s"></a>
-<h2>%(Function)s</h2>
-<b>%(Function)s</b>(<i>%(Params)s</i>)
-%(FunctionDescription)s
+<a NAME="{Anchor}" ID="{Anchor}"></a>
+<h2>{Function}</h2>
+<b>{Function}</b>(<i>{Params}</i>)
+{FunctionDescription}
 <div align="right"><a href="#top">Up</a></div>
 <hr />'''
 
 listTemplate = \
 '''<table>
-%(Entries)s
+{Entries}
 </table>'''
 
 listEntryTemplate = \
 '''<tr>
-<td><a href="#%(Link)s">%(Name)s</a></td>
-<td>%(Deprecated)s%(Description)s</td>
+<td><a href="#{Link}">{Name}</a></td>
+<td>{Deprecated}{Description}</td>
 </tr>'''
 
 listEntryNoneTemplate = \
@@ -139,22 +139,22 @@
 '''<b>Deprecated.</b>'''
 
 listEntrySimpleTemplate = \
-'''<tr><td>%(Name)s</td></tr>'''
+'''<tr><td>{Name}</td></tr>'''
 
 paragraphTemplate = \
 '''<p>
-%(Lines)s
+{Lines}
 </p>'''
 
 parametersListTemplate = \
 '''<dl>
-%(Parameters)s
+{Parameters}
 </dl>'''
 
 parametersListEntryTemplate = \
-'''<dt><i>%(Name)s</i></dt>
+'''<dt><i>{Name}</i></dt>
 <dd>
-%(Description)s
+{Description}
 </dd>'''
 
 returnsTemplate = \
@@ -167,68 +167,68 @@
 
 exceptionsListTemplate = \
 '''<dl>
-%(Exceptions)s
+{Exceptions}
 </dl>'''
 
 exceptionsListEntryTemplate = \
-'''<dt>Raises <b>%(Name)s</b>:</dt>
+'''<dt>Raises <b>{Name}</b>:</dt>
 <dd>
-%(Description)s
+{Description}
 </dd>'''
 
 signalsListTemplate = \
 '''<h4>Signals</h4>
 <dl>
-%(Signals)s
+{Signals}
 </dl>'''
 
 signalsListEntryTemplate = \
-'''<dt>%(Name)s</dt>
+'''<dt>{Name}</dt>
 <dd>
-%(Description)s
+{Description}
 </dd>'''
 
 eventsListTemplate = \
 '''<h4>Events</h4>
 <dl>
-%(Events)s
+{Events}
 </dl>'''
 
 eventsListEntryTemplate = \
-'''<dt>%(Name)s</dt>
+'''<dt>{Name}</dt>
 <dd>
-%(Description)s
+{Description}
 </dd>'''
 
 deprecatedTemplate = \
 '''<p>
 <b>Deprecated.</b>
-%(Lines)s
+{Lines}
 </p>'''
 
 authorInfoTemplate = \
 '''<p>
 <i>Author(s)</i>:
-%(Authors)s
+{Authors}
 </p>'''
 
 seeListTemplate = \
 '''<dl>
 <dt><b>See Also:</b></dt>
-%(Links)s
+{Links}
 </dl>'''
 
 seeListEntryTemplate = \
 '''<dd>
-%(Link)s
+{Link}
 </dd>'''
 
 seeLinkTemplate = \
-'''<a %(Link)s'''
+'''<a {Link}'''
 
 sinceInfoTemplate = \
 '''<p>
-<b>since</b> %(Info)s
+<b>since</b> {Info}
 </p>'''
 
 #################################
@@ -236,25 +236,25 @@
 #################################
 
 indexBodyTemplate = '''
-<h1>%(Title)s</h1>
-%(Description)s
-%(Subpackages)s
-%(Modules)s'''
+<h1>{Title}</h1>
+{Description}
+{Subpackages}
+{Modules}'''
 
 indexListPackagesTemplate = '''
 <h3>Packages</h3>
 <table>
-%(Entries)s
+{Entries}
 </table>'''
 
 indexListModulesTemplate = '''
 <h3>Modules</h3>
 <table>
-%(Entries)s
+{Entries}
 </table>'''
 
 indexListEntryTemplate = \
 '''<tr>
-<td><a href="%(Link)s">%(Name)s</a></td>
-<td>%(Description)s</td>
+<td><a href="{Link}">{Name}</a></td>
+<td>{Description}</td>
 </tr>'''

eric ide

mercurial