def indicesFromString(indsString):
 try:
  inds = int(round(float(indsString)))
  return [inds]
 except Exception:
  pass
 try:
  inds = sliceFromString(indsString)
  return inds
 except Exception:
  pass
 try:
  inds = list(eval(indsString))
  return inds
 except Exception:
  pass

def indicesFromString ( indsString ) : try : inds = int ( round ( float ( indsString ) ) ) return [ inds ] except Exception : pass try : inds = sliceFromString ( indsString ) return inds except Exception : pass try : inds = list ( eval ( indsString ) ) return inds except Exception : pass
convert a text string into a valid list of indices .