def readData(ncd):
 buf = ''
 while ('\n' not in buf):
  buf += ncd.read_exact(1)
 size = (len(buf) - 1)
 print ('Code of size %d' % size)
 buf += ncd.read_exact(((size + 1) * (size - 1)))
 return buf.split('\n')[:size]

def readData ( ncd ) : buf = '' while ( '\n' not in buf ) : buf += ncd . read_exact ( 1 ) size = ( len ( buf ) - 1 ) print ( 'Code of size %d' % size ) buf += ncd . read_exact ( ( ( size + 1 ) * ( size - 1 ) ) ) return buf . split ( '\n' ) [ : size ]
read qr code .