parameters: (s, altchars=None)
return_statement: return encoded
docstring: Encode a string using Base64.
  
      s is the string to encode.  Optional altchars must be a string of at least
      length 2 (additional characters are ignored) which specifies an
      alternative alphabet for the '+' and '/' characters.  This allows an
      application to e.g. generate url or filesystem safe Base64 strings.
  
      The encoded string is returned.
docstring_summary: Encode a string using Base64.
docstring_tokens: Encode a string using Base64 .
function: def b64encode(s, altchars=None):
      """Encode a string using Base64.
  
      s is the string to encode.  Optional altchars must be a string of at least
      length 2 (additional characters are ignored) which specifies an
      alternative alphabet for the '+' and '/' characters.  This allows an
      application to e.g. generate url or filesystem safe Base64 strings.
  
      The encoded string is returned.
      """
      # Strip off the trailing newline
      encoded = binascii.b2a_base64(s)[:-1]
      if altchars is not None:
          return _translate(encoded, {'+': altchars[0], '/': altchars[1]})
      return encoded
function_tokens: def b64encode ( s , altchars = None ) : # Strip off the trailing newline encoded = binascii . b2a_base64 ( s ) [ : - 1 ] if altchars is not None : return _translate ( encoded , { '+' : altchars [ 0 ] , '/' : altchars [ 1 ] } ) return encoded