UtilitiesPython2/Tools.py

changeset 1309
6caa231421cf
parent 1308
2b602a1521e7
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1308:2b602a1521e7 1309:6caa231421cf
106 @keyparam endComment string identifying the end of a comment (string) 106 @keyparam endComment string identifying the end of a comment (string)
107 @return list containing the extracted flags (list of strings) 107 @return list containing the extracted flags (list of strings)
108 """ 108 """
109 flags = [] 109 flags = []
110 110
111 pos = line.rindex(startComment) 111 pos = line.rfind(startComment)
112 if pos >= 0: 112 if pos >= 0:
113 comment = line[pos + len(startComment):].strip() 113 comment = line[pos + len(startComment):].strip()
114 if endComment: 114 if endComment:
115 comment = comment.replace("endComment", "") 115 comment = comment.replace("endComment", "")
116 flags = [f.strip() for f in comment.split() 116 flags = [f.strip() for f in comment.split()

eric ide

mercurial