Salome HOME
Merge remote-tracking branch 'origin/V8_3_BR' into ngr/python3_dev
[modules/kernel.git] / bin / salomeContextUtils.py.in
index c078c96fe2ce564f593078eb07f12ee7e58bbf73..43443e7d169b17fe184c58190951f27ef9157b3b 100644 (file)
@@ -188,8 +188,8 @@ def getScriptsAndArgs(args=None, searchPathList=None):
         extracted_args = []
         x = elt.split(",")
         # x is ['[file1', 'file2]', 'val1', 'done', '[1', '2', '3]', '[True', 'False]', 'ok']
-        list_begin_indices = [i for i in xrange(len(x)) if x[i].startswith('[')] # [0, 4, 7]
-        list_end_indices = [i for i in xrange(len(x)) if x[i].endswith(']')] # [1, 6, 8]
+        list_begin_indices = [i for i in range(len(x)) if x[i].startswith('[')] # [0, 4, 7]
+        list_end_indices = [i for i in range(len(x)) if x[i].endswith(']')] # [1, 6, 8]
         start = 0
         for lbeg, lend in zip(list_begin_indices,list_end_indices): # [(0, 1), (4, 6), (7, 8)]
           if lbeg > start:
@@ -255,7 +255,7 @@ def getScriptsAndArgs(args=None, searchPathList=None):
           ispython = False
           try:
             fn = open(currentScript)
-            for i in xrange(10): # read only 10 first lines
+            for i in range(10): # read only 10 first lines
               ln = fn.readline()
               if re.search("#!.*python"):
                 ispython = True