def quopri_encode(input, errors='strict'):
 assert (errors == 'strict')
 f = StringIO(str(input))
 g = StringIO()
 quopri.encode(f, g, 1)
 output = g.getvalue()
 return (output, len(input))

def quopri_encode ( input , errors = 'strict' ) : assert ( errors == 'strict' ) f = StringIO ( str ( input ) ) g = StringIO ( ) quopri . encode ( f , g , 1 ) output = g . getvalue ( ) return ( output , len ( input ) )
encode the input .