Thanks

- Code: Select all
`... # how many columns per line`

xxxx len(ary): 95

xxxx len(ary): 100

xxxx len(ary): 98

xxxx len(ary): 94

xxxx len(ary): 98

xxxx len(ary): 93

xxxx len(ary): 98

xxxx len(ary): 101

xxxx len(ary): 98

...

- Code: Select all
`def uci_to_files(file_name):`

lines = [line.strip() for line in open(file_name)]

rows = []

for line in lines:

row = []

ary = line.split(' ')

print "xxxx len(ary): %d" % len(ary)

for col in ary:

column_value = col.split(':')

if len(column_value) == 2:

if column_value[1] is None:

v = float(0)

else:

v = float(column_value[1])

elif len(column_value) == 1:

if column_value[0] == '+1':

v = float(1)

else:

v = float(column_value[0])

row.append(v)

rows.append(row)

return rows