title: PrettyTable is not printing table correctly in tkinter (python GUI)
body: <p>I am trying to print table via <code>PrettyTable</code> library in python in my <code>ScrolledText</code> tkinter widget.
  here is the function snippet:</p>
  <pre><code>global Scrolledtext1
  Scrolledtext1 = ScrolledText(top, state=&quot;disable&quot;)
  
  def display_output(self,output_message):
          myTable = PrettyTable()
          
          for list_item in output_message:
              myTable.add_row(list_item)
              
          print(myTable)
          
          Scrolledtext1.config(state=&quot;normal&quot;)        # changing text box's state so that we can edit it
          Scrolledtext1.delete(&quot;1.0&quot;, &quot;end&quot;)          # deletes previous contents
          Scrolledtext1.insert(1.0,myTable)           # showing output message
          Scrolledtext1.config(state=&quot;disable&quot;)       # disabling text box's state so that user cannot change it's content
  </code></pre>
  <p>I am inserting myTable in second last line in above code (in <em>insert</em> method).
  this is <strong>printing table correctly</strong> in <code>console</code> via print statement but it is <strong>not printing correctly</strong> in <code>ScrolledText</code> .
  This is screenshot of this table which is inserted in <code>ScrolledText</code> in tkinter:</p>
  <p>GUI output image</p>
  <p><a href="https://i.stack.imgur.com/10kMA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/10kMA.png" alt="enter image description here" /></a></p>
  <p>console output image</p>
  <p><a href="https://i.stack.imgur.com/7BKOy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7BKOy.png" alt="enter image description here" /></a></p>
  <p>Please suggest me something so that i can print table correctly in <code>ScrolledText</code>.</p>