parameters: (input, output)
docstring: Encode a file.
docstring_summary: Encode a file.
docstring_tokens: Encode a file .
function: def encode(input, output):
      """Encode a file."""
      while True:
          s = input.read(MAXBINSIZE)
          if not s:
              break
          while len(s) < MAXBINSIZE:
              ns = input.read(MAXBINSIZE-len(s))
              if not ns:
                  break
              s += ns
          line = binascii.b2a_base64(s)
          output.write(line)
function_tokens: def encode ( input , output ) : while True : s = input . read ( MAXBINSIZE ) if not s : break while len ( s ) < MAXBINSIZE : ns = input . read ( MAXBINSIZE - len ( s ) ) if not ns : break s += ns line = binascii . b2a_base64 ( s ) output . write ( line )