(input, errors='strict')
return (output, len(input))
Encode the input, returning a tuple (output object, length consumed).

    errors defines the error handling to apply. It defaults to
    'strict' handling which is the only currently supported
    error handling for this codec.
Encode the input, returning a tuple (output object, length consumed).
Encode the input returning a tuple ( output object length consumed ) .
def quopri_encode(input, errors='strict'):
    """Encode the input, returning a tuple (output object, length consumed).

    errors defines the error handling to apply. It defaults to
    'strict' handling which is the only currently supported
    error handling for this codec.

    """
    assert errors == 'strict'
    # using str() because of cStringIO's Unicode undesired Unicode behavior.
    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' # using str() because of cStringIO's Unicode undesired Unicode behavior. f = StringIO ( str ( input ) ) g = StringIO ( ) quopri . encode ( f , g , 1 ) output = g . getvalue ( ) return ( output , len ( input ) )