{"action":"created","issue":{"url":"https://api.github.com/repos/scopatz/xonsh/issues/486","labels_url":"https://api.github.com/repos/scopatz/xonsh/issues/486/labels{/name}","comments_url":"https://api.github.com/repos/scopatz/xonsh/issues/486/comments","events_url":"https://api.github.com/repos/scopatz/xonsh/issues/486/events","html_url":"https://github.com/scopatz/xonsh/issues/486","id":115928173,"number":486,"title":"Multi-line statements in Windows","user":{"login":"johndcook","id":5816613,"avatar_url":"https://avatars.githubusercontent.com/u/5816613?v=3","gravatar_id":"","url":"https://api.github.com/users/johndcook","html_url":"https://github.com/johndcook","followers_url":"https://api.github.com/users/johndcook/followers","following_url":"https://api.github.com/users/johndcook/following{/other_user}","gists_url":"https://api.github.com/users/johndcook/gists{/gist_id}","starred_url":"https://api.github.com/users/johndcook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johndcook/subscriptions","organizations_url":"https://api.github.com/users/johndcook/orgs","repos_url":"https://api.github.com/users/johndcook/repos","events_url":"https://api.github.com/users/johndcook/events{/privacy}","received_events_url":"https://api.github.com/users/johndcook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-09T17:41:53Z","updated_at":"2015-11-10T03:33:46Z","closed_at":null,"body":"Multi-line statements fail on Windows. For example, if I type `if True:` then I get an error message as soon as I hit Return. The same holds for `if`, `for`, or `def` statements.\r\n\r\nI've seen this launching xonsh from cmd.exe and from PowerShell, on Windows 8.1 and on Windows 10. Running the latest released version at the time of writing, 0.2.3.\r\n\r\n$ if True:\r\npre_input_hook failed\r\nReadline internal error\r\nTraceback (most recent call last):\r\n  File \"C:\\bin\\Anaconda3\\lib\\site-packages\\pyreadline\\modes\\basemode.py\", line 124, in readline_setup\r\n    self.pre_input_hook()\r\n  File \"C:\\bin\\Anaconda3\\lib\\site-packages\\xonsh\\readline_shell.py\", line 81, in inserter\r\n    readline.redisplay()\r\nAttributeError: 'module' object has no attribute 'redisplay'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\bin\\Anaconda3\\lib\\site-packages\\pyreadline\\console\\console.py\", line 768, in hook_wrapper_23\r\n    res = ensure_str(readline_hook(prompt))\r\n  File \"C:\\bin\\Anaconda3\\lib\\site-packages\\pyreadline\\rlmain.py\", line 569, in readline\r\n    self.readline_setup(prompt)\r\n  File \"C:\\bin\\Anaconda3\\lib\\site-packages\\pyreadline\\rlmain.py\", line 564, in readline_setup\r\n    BaseReadline.readline_setup(self, prompt)\r\n  File \"C:\\bin\\Anaconda3\\lib\\site-packages\\pyreadline\\rlmain.py\", line 253, in readline_setup\r\n    return self.mode.readline_setup(prompt)\r\n  File \"C:\\bin\\Anaconda3\\lib\\site-packages\\pyreadline\\modes\\basemode.py\", line 127, in readline_setup\r\n    traceback.print_exc()\r\nNameError: name 'traceback' is not defined\r\nxonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True\r\n  File \"<string>\", line None\r\nSyntaxError: None: no further code"},"comment":{"url":"https://api.github.com/repos/scopatz/xonsh/issues/comments/155274074","html_url":"https://github.com/scopatz/xonsh/issues/486#issuecomment-155274074","issue_url":"https://api.github.com/repos/scopatz/xonsh/issues/486","id":155274074,"user":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T03:33:46Z","updated_at":"2015-11-10T03:33:46Z","body":"On Mon, Nov 9, 2015 at 6:49 PM, John Cook <notifications@github.com> wrote:\n\n> I installed prompt_toolkit 0.47. When I type\n>\n\nThat is quite old. On my system prompt-toolkit is version 0.54. and the\nKeyBindingManager class in that version has a  enable_abort_and_exit_bindings\nkeyword arg. If you update your prompt-toolkit software to something more\nrecent I'm confident your problem will be resolved.\n\nI'm curious why you're using an ancient version of prompt_toolkit. The most\nlikely reason is you are working in an environment that requires manual\nupgrades and you simply haven't done an update in a long time. I found\nmyself having similar problems so I wrote a \"swupdate\" script which\nautomates the process of updating Homebrew and Anaconda software on my Mac\nOS X and Linux servers.\n\n> $ xonsh --shell-type prompt_toolkit\n>\n> I get the following error:\n>\n> Traceback (most recent call last):\n> File \"C:\\bin\\Anaconda3\\Scripts\\xonsh-script.py\", line 6, in\n> sys.exit(main())\n> File \"C:\\bin\\Anaconda3\\lib\\site-packages\\xonsh\\main.py\", line 83, in main\n> args = premain(argv)\n> File \"C:\\bin\\Anaconda3\\lib\\site-packages\\xonsh\\main.py\", line 72, in\n> premain\n> shell = builtins.*xonsh_shell* = Shell(*\n>\n> *shell_kwargs) File \"C:\\bin\\Anaconda3\\lib\\site-packages\\xonsh\\shell.py\",\n> line 41, in init ctx=self.ctx, **kwargs)\n> File \"C:\\bin\\Anaconda3\\lib\\site-packages\\xonsh\\prompt_toolkit_shell.py\",\n> line 51, in *init*\n> enable_search=True, enable_abort_and_exit_bindings=True)\n> TypeError: *init*() got an unexpected keyword argument\n> 'enable_abort_and_exit_bindings'\n>\n> When I set the environment variable SHELL_TYPE to prompt_toolkit I get the\n> same error when I start xonsh.\n>\n\n-- \nKurtis Rader\nCaretaker of the exceptional canines Junior and Hank\n"}}