title: Pycharm os.get_terminal_size() not working
body: <p>Python 3.7.1 on Ubuntu 18.04.2 LTS</p>
  
  <p>Using Pycharm version:</p>
  
  <pre><code>PyCharm 2019.1.3 (Professional Edition)
  Build #PY-191.7479.30, built on May 30, 2019
  Linux 4.18.0-22-generic
  </code></pre>
  
  <p>I'm having issues with the <code>os.get_terminal_size()</code> function call</p>
  
  <p>Running the command from the terminal window works:</p>
  
  <pre><code>Python 3.7.1 (default, Oct 22 2018, 11:21:55) 
  [GCC 8.2.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import os
  &gt;&gt;&gt; os.get_terminal_size()
  os.terminal_size(columns=223, lines=18)
  </code></pre>
  
  <p>But running it from the Python Console window doesn't</p>
  
  <pre><code>&gt;&gt;&gt;import os
  &gt;&gt;&gt;os.get_terminal_size()
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  OSError: [Errno 25] Inappropriate ioctl for device
  </code></pre>
  
  <p>My googling hasn't produced much information specific to my issue at hand. What does <code>OSError: [Errno 25] Inappropriate ioctl for device</code> actually mean and how do I fix it?</p>