title: Arrow keys not working while entering data for input() function
body: <p>In linux, the arrow keys don't work when I try to enter data for an <code>input()</code> function. I get escape characters. See below (when I pressed left arrow key).</p>
  
  <pre><code>dp@hp:~$ python3 -c "x = input('enter a number '); print(x)"
  enter a number 123^[[D^[[D
  </code></pre>
  
  <p>I have <code>readline</code> installed (I am able to import it in the python shell).
  The arrow keys work fine in the interactive interpreter but not in the above case (or when I execute <code>input()</code> from a script).</p>
  
  <p>What could be the reason? </p>