py3: rebar-fix
This commit is contained in:
@@ -505,18 +505,18 @@ def strprocessOfCustomSpacing(span_string):
|
||||
in specific syntax and return output in the form of list. For eg.
|
||||
Input: "3@100+2@200+3@100"
|
||||
Output: [100, 100, 100, 200, 200, 100, 100, 100]"""
|
||||
import string
|
||||
span_st = string.strip(span_string)
|
||||
span_sp = string.split(span_st, '+')
|
||||
# import string
|
||||
span_st = span_string.strip()
|
||||
span_sp = span_st.split('+')
|
||||
index = 0
|
||||
spacinglist = []
|
||||
while index < len(span_sp):
|
||||
# Find "@" recursively in span_sp array.
|
||||
# If not found, append the index value to "spacinglist" array.
|
||||
if string.find(span_sp[index],'@') == -1:
|
||||
if span_sp[index].find('@') == -1:
|
||||
spacinglist.append(float(span_sp[index]))
|
||||
else:
|
||||
in_sp = string.split(span_sp[index], '@')
|
||||
in_sp = span_sp[index].split('@')
|
||||
count = 0
|
||||
while count < int(in_sp[0]):
|
||||
spacinglist.append(float(in_sp[1]))
|
||||
|
||||
Reference in New Issue
Block a user