How to remove lines from stdout in python?
<p>I have a program that grabs some data through ssh using paramiko:</p>

<pre><code>ssh = paramiko.SSHClient()

ssh.connect(main.Server_IP, username=main.Username, password=main.Password)

ssh_stdin_host, ssh_stdout_host, ssh_stderr_host =ssh_session.exec_command(setting.GetHostData)
</code></pre>

<p>I would like to remove the first 4 lines from ssh_stdout_host. I've tried using StringIO to use readlines like this:</p>

<pre><code>output = StringIO("".join(ssh_stdout_host))
data_all = output.readlines()
</code></pre>

<p>But I'm lost after this. What would be a good approach? Im using python 2.6.5. Thanks.</p>
