title: there is a way to detect if '\r' work or not?
body: <p>I have a script to download some files with <code>urllib.request.urlretrieve</code> and I use <a href="https://pypi.python.org/pypi/tqdm" rel="nofollow"><code>tqdm</code></a> for my progress bar and that work fine, except when I use in the IDLE because there the others control characters like <code>'\r'</code> or <code>'\b'</code> don't work properly and as result the output is ugly </p>
  
  <p>that is </p>
  
  <p>IDLE</p>
  
  <pre><code>&gt;&gt;&gt; print('abc\rXXX')
  abc\rXXX
  &gt;&gt;&gt; print('abc\b\b\bXXX')
  abc\b\b\bXXX
  &gt;&gt;&gt;
  </code></pre>
  
  <p>terminal/cmd</p>
  
  <pre><code>&gt;&gt;&gt; print('abc\rXXX')
  XXX
  &gt;&gt;&gt; print('abc\b\b\bXXX')
  XXX
  &gt;&gt;&gt;
  </code></pre>
  
  <p>my question is, how I can detect when <code>'\r'</code> will work properly??</p>
  
  <p>so I can do something like this</p>
  
  <pre><code>from tqdm import tqdm, tqdm_gui
  if control_char_work_fine():
      progress_bar = tqdm
  else:
      progress_bar = tqdm_qui
  </code></pre>
  
  <p>or if that is no possible how to detect when I am in the IDLE?</p>