title: Python splitlines result changes based on terminal screen size?
body: <p>I have some commands in a file that I'm reading in python and executing using subprocess.Popen. When run splitlines() method, the number of lines that are produced depends on the width of my terminal screen. The commands in the file are:</p>
  
  <p><code>CREATE EXTERNAL TABLE tableforview (name string, dob string) STORED AS PARQUET LOCATION 'location';</code></p>
  
  <p>There are no newlines in the file; it is all typed on one line.</p>
  
  <pre><code>hivep = subprocess.Popen("beeline -u 'connectionstring' --force=true --outputformat=csv2 --showWarnings=false -f hivetest", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
  (output, err) = hivep.communicate()
  
  hivequeryList = []
  hivequery = ""
  
  for line in output.splitlines():
      print(line)
  </code></pre>
  
  <p>However, when I print the output of splitlines() method line by line, I get two lines or three lines depending on how large my terminal screen is. </p>
  
  <p>I'm reading the split lines into a dictionary. So what I would expect is for the key of the dictionary to contain the entire create query, and the value to contain the result. But what is happening is the query is getting cut off, like so </p>
  
  <p><code>{"CREATE EXTERNAL TABLE tableforview (name string, dob string) STORED AS PARQUE" : "T LOCATION 'location';"}</code></p>
  
  <p>And the location at which that cutoff occurs changes depending on how wide my terminal screen is.</p>
  
  <p>I don't know why my terminal screen width should matter when reading from a file. Would appreciate any insight.</p>