title: Disable pagination on the command line
body: <p>I am trying to write a script using the python module <code>pexpect</code> that will connect to a server and execute commands like you are typing at the command line.</p>
  
  <p>So for example, you can have something like:</p>
  
  <p><code>child = pexpect.spawn('/usr/bin/ssh user@example.com')</code> </p>
  
  <p><code>child.sendLine('ls -al')</code> </p>
  
  <p>or whatever command you want to send. It will act like you are typing in a terminal.</p>
  
  <p>In my script, I am trying to run a command using the <code>sendLine()</code> API that essentially dumps out a bunch of info to the command line. But there is a pagination that requires there to be another command where you have to press a key to continue to get to the next command. </p>
  
  <p>So for example:</p>
  
  <p><code>[Some info]</code></p>
  
  <p><code>--------------- To continue, press any key. To quit, press 'q'. ---------------</code></p>
  
  <p><code>[Some more info]</code></p>
  
  <p>Is there a way that I can turn pagination off or a command I can send before I try to dump the info to the command line to turn it off?</p>