{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/9118","labels_url":"https://api.github.com/repos/ipython/ipython/issues/9118/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/9118/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/9118/events","html_url":"https://github.com/ipython/ipython/pull/9118","id":125622538,"number":9118,"title":"[WIP] Terminal interface based on prompt_toolkit","user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars.githubusercontent.com/u/327925?v=3","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-01-08T14:30:05Z","updated_at":"2016-01-12T13:50:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ipython/ipython/pulls/9118","html_url":"https://github.com/ipython/ipython/pull/9118","diff_url":"https://github.com/ipython/ipython/pull/9118.diff","patch_url":"https://github.com/ipython/ipython/pull/9118.patch"},"body":"This adds a new terminal interface using prompt_toolkit in place of readline. It's on top of my refactoring in #9070.\r\n\r\nYou can test the new interface by running:\r\n\r\n    python3 -m IPython.terminal.ptshell\r\n\r\nMultiline editing with syntax highlighting, persistent history and tab completion are all working. So far, I'm really impressed with prompt_toolkit: I've written about 100 lines to make that happen, and while it's taken some research, nothing I've had to do feels like a hack. Kudos to @jonathanslenders :-)"},"comment":{"url":"https://api.github.com/repos/ipython/ipython/issues/comments/170917243","html_url":"https://github.com/ipython/ipython/pull/9118#issuecomment-170917243","issue_url":"https://api.github.com/repos/ipython/ipython/issues/9118","id":170917243,"user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars.githubusercontent.com/u/327925?v=3","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T13:50:30Z","updated_at":"2016-01-12T13:50:30Z","body":"On Windows, pyreadline currently handles translating the ANSI escapes for colours etc. into Windows API calls. Clearly PT can talk to Windows for its own colouring etc., but we'd also like to use colours in other parts of IPython, like for tracebacks.\r\n\r\n- Does PT offer an ANSI to Windows-API convertor that we can hook into `sys.stdout` to colour other output? Or should we use a separate package like [colorama](https://pypi.python.org/pypi/colorama) to do this?\r\n- If we use a separate ANSI to Windows terminal package, is there a risk that will interfere with what PT is doing?"}}