diff --git a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
index a80fba002323b415d6d4e58c6224a1991dc37efd..d93f54555029d1b580f7a31d7a810ba01cb625ed 100755
--- a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
+++ b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
@@ -68,23 +68,23 @@ def GetApplicationExamplePythonSnippet(app,idx,expand = False, inputpath="",outp
     appname = "app"
     output = ""
 
+    output += ".. code-block:: python\n\n"
+
     # Render example comment
     if len(app.GetExampleComment(idx)) > 0:
-        output += app.GetExampleComment(idx) + ":\n\n"
-
-    output += ".. code-block:: python\n\n"
+        output += "\t# {}\n".format(app.GetExampleComment(idx))
 
-    output+= "\timport otbApplication" + linesep + linesep
-    output+= "\t" + appname + " = otbApplication.Registry.CreateApplication(\"" + app.GetName() + "\")" + linesep + linesep
+    output += "\timport otbApplication" + linesep + linesep
+    output += "\t" + appname + " = otbApplication.Registry.CreateApplication(\"" + app.GetName() + "\")" + linesep + linesep
     for i in range(0, app.GetExampleNumberOfParameters(idx)):
         param = app.GetExampleParameterKey(idx,i)
         value = app.GetExampleParameterValue(idx,i)
         paramtype = app.GetParameterType(param)
         paramrole = app.GetParameterRole(param)
         if paramtype == ParameterType_ListView:
-            break
+            break # TODO
         if paramtype == ParameterType_Group:
-            break
+            break # TODO
         if paramtype ==  ParameterType_Choice:
             #app.SetParameterString(param,value)
             output+= "\t" + appname + ".SetParameterString(" + EncloseString(param) + "," + EncloseString(value) + ")"