I'm using zsh, iTerm2 (3.0.9), and pyenv (1.0.2) with pyenv global set to 3.5.2.
In the Python shell, the up and down arrow keys used to work, to access the previous commands in the history. But now after upgrading to OSX 10.12, instead it shows control characters. For example up arrow displays:
^[[A
I've tried installing readline as suggested in Seeing escape characters when pressing the arrow keys in python shell but that didn't help. I don't have the PYTHONSTARTUP variable but didn't used to before, and not sure how that interacts with pyenv.