def _unpack_lines(out):
 rexp = '(?ms)^(?P<package>[^#]\\S+)[ DCTB  ]+(?P<question>\\S+)[ DCTB  ]+(?P<type>\\S+)[ DCTB  ]+(?P<value>[^\n]*)$'
 lines = re.findall(rexp, out)
 return lines

def _unpack_lines ( out ) : rexp = '(?ms)^(?P<package>[^#]\\S+)[ DCTB  ]+(?P<question>\\S+)[ DCTB  ]+(?P<type>\\S+)[ DCTB  ]+(?P<value>[^\n]*)$' lines = re . findall ( rexp , out ) return lines
unpack the debconf lines .