Reading data using tn.read_all() in python
<p>read_all()" to read data from a cisco device.
some time it reads the data and sometime it won't read and gives empty string.
I tried below 2 commands but still it's not consitently reading data.</p>

<pre><code>data=tn.read_until("exit")
data= tn.read_all()
</code></pre>

<p>please give some inputs i am new to python.</p>

<p>code i am using:</p>

<pre><code>_command2='show chassis'
    print 'Commands issued............'
    #ISSUE COMMANDS VIA TELNET    
    tn.write("term len 0\r")
    #tn.read_until(" ")    
    #tn.write(_command1+"\r")   
    tn.write(_command2+"\r")
    tn.write("exit\r" )
    print 'Read telnet data............'
    #READ TELNET DATA
    #data=tn.read_eager()
    data=tn.read_until("exit")
    #data= tn.read_all()
    #print data
    print 'Telnet data read successfully............'
</code></pre>
