title: Python3 paramiko memory error with large stdout data
body: <p>I am using the paramiko library to ssh into a router and run a sh operational command, in which the output is very large (> 500MB), and it throws a memory error.  Is there a way to re write my code so it doesn't put all data into memory and throw an error.</p>
  
  <pre><code>stdin, stdout, stderr = ssh_session.execute_command(' '.join(['show operational',request,'xml'])) #request is just a str represnting the differnet components (AAA, etc.)
  process_output(''.join(stdout.readlines()),request) #stdout.readlines() is what causes the memory error
  ssh_session.close()
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>polling IPV6_RIB
  Exception: Expecting packet from (31,), got 94
  Traceback (most recent call last):
    File "/home/lab/5.3.2_xml/py3/lib/python3.4/site-packages/paramiko/transport.py", line 1607, in run
      raise SSHException('Expecting packet from %r, got %d' % (self._expected_packet, ptype))
  paramiko.ssh_exception.SSHException: Expecting packet from (31,), got 94
  
  Traceback (most recent call last):
    File "xml_oper.py", line 42, in &lt;module&gt;
      main()
    File "xml_oper.py", line 37, in main
      process_output(''.join(stdout.readlines()),request)
  MemoryError
  </code></pre>