def GetIndentLevel(line):
 indent = Match('^( *)\\S', line)
 if indent:
  return len(indent.group(1))
 else:
  return 0

def GetIndentLevel ( line ) : indent = Match ( '^( *)\\S' , line ) if indent : return len ( indent . group ( 1 ) ) else : return 0
return the number of leading spaces in line .