def parse_lang(rule):
 parser = argparse.ArgumentParser()
 rules = shlex.split(rule)
 rules.pop(0)
 parser.add_argument('lang')
 args = clean_args(vars(parser.parse_args(rules)))
 parser = None
 return args

def parse_lang ( rule ) : parser = argparse . ArgumentParser ( ) rules = shlex . split ( rule ) rules . pop ( 0 ) parser . add_argument ( 'lang' ) args = clean_args ( vars ( parser . parse_args ( rules ) ) ) parser = None return args
parse the lang line .