I am trying to capture and manage data in a Telnet session using telnetlib, everything is going well, however my newbie with Python causes me some headache.
My problem is pretty straightforward, I can capture and display the data I want (for now), but I just seem to loop through the errors cyclically when I try to remove the last row of data from the data that I captured. My code looks something like this:
... Snipped Boring Stuff ... tn.write('command to gather data' + '\r') data = tn.read_very_eager() print data ... snipped more boring stuff ...
Pretty simple ... So, how in the world do I delete the last row of data from tn.read_very_eager () or data ()?
Any direction would be amazing ... Sorry for the very simple question, but the material that I read and tried so far did not do anything, but upset me, my keyboard can no longer be abused :)
source share