Title: IPython 5 breaks Emacs behaviour on Windows · Issue #9725 · ipython/ipython · GitHub
Open Graph Title: IPython 5 breaks Emacs behaviour on Windows · Issue #9725 · ipython/ipython
X Title: IPython 5 breaks Emacs behaviour on Windows · Issue #9725 · ipython/ipython
Description: Hi all, I have successfully used IPython from within an Emacs buffer in the past, usually by using the jupyter console command. My basic config uses the following: (setq-default python-shell-interpreter "C:/Python34/Scripts/jupyter.exe" ...
Open Graph Description: Hi all, I have successfully used IPython from within an Emacs buffer in the past, usually by using the jupyter console command. My basic config uses the following: (setq-default python-shell-interp...
X Description: Hi all, I have successfully used IPython from within an Emacs buffer in the past, usually by using the jupyter console command. My basic config uses the following: (setq-default python-shell-interp...
Opengraph URL: https://github.com/ipython/ipython/issues/9725
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IPython 5 breaks Emacs behaviour on Windows","articleBody":"Hi all, I have successfully used IPython from within an Emacs buffer in the past, usually by using the `jupyter console` command. My basic config uses the following:\n\n```\n(setq-default python-shell-interpreter \"C:/Python34/Scripts/jupyter.exe\"\n python-shell-interpreter-args \"console\")\n```\n\nThe problem seems to be that the latest version of IPython breaks this integration, as the following error message / traceback appears:\n\n```\nTraceback (most recent call last):\n File \"c:\\python34\\lib\\runpy.py\", line 170, in _run_module_as_main\n \"__main__\", mod_spec)\n File \"c:\\python34\\lib\\runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"c:\\Python34\\Scripts\\ipython.exe\\__main__.py\", line 9, in \u003cmodule\u003e\n File \"c:\\python34\\lib\\site-packages\\IPython\\__init__.py\", line 119, in start_ipython\n return launch_new_instance(argv=argv, **kwargs)\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 595, in launch_instance\n app.initialize(argv)\n File \"\u003cdecorator-gen-110\u003e\", line 2, in initialize\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 74, in catch_config_error\n return method(app, *args, **kwargs)\n File \"c:\\python34\\lib\\site-packages\\IPython\\terminal\\ipapp.py\", line 300, in initialize\n super(TerminalIPythonApp, self).initialize(argv)\n File \"\u003cdecorator-gen-7\u003e\", line 2, in initialize\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 74, in catch_config_error\n return method(app, *args, **kwargs)\n File \"c:\\python34\\lib\\site-packages\\IPython\\core\\application.py\", line 446, in initialize\n self.parse_command_line(argv)\n File \"c:\\python34\\lib\\site-packages\\IPython\\terminal\\ipapp.py\", line 295, in parse_command_line\n return super(TerminalIPythonApp, self).parse_command_line(argv)\n File \"\u003cdecorator-gen-4\u003e\", line 2, in parse_command_line\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 74, in catch_config_error\n return method(app, *args, **kwargs)\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 488, in parse_command_line\n return self.initialize_subcommand(subc, subargv)\n File \"c:\\python34\\lib\\site-packages\\IPython\\core\\application.py\", line 236, in initialize_subcommand\n return super(BaseIPythonApplication, self).initialize_subcommand(subc, argv)\n File \"\u003cdecorator-gen-3\u003e\", line 2, in initialize_subcommand\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 74, in catch_config_error\n return method(app, *args, **kwargs)\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 426, in initialize_subcommand\n self.subapp.initialize(argv)\n File \"\u003cdecorator-gen-114\u003e\", line 2, in initialize\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\application.py\", line 74, in catch_config_error\n return method(app, *args, **kwargs)\n File \"c:\\python34\\lib\\site-packages\\jupyter_console\\app.py\", line 137, in initialize\n self.init_shell()\n File \"c:\\python34\\lib\\site-packages\\jupyter_console\\app.py\", line 110, in init_shell\n client=self.kernel_client,\n File \"c:\\python34\\lib\\site-packages\\traitlets\\config\\configurable.py\", line 412, in instance\n inst = cls(*args, **kwargs)\n File \"c:\\python34\\lib\\site-packages\\jupyter_console\\ptshell.py\", line 252, in __init__\n self.init_prompt_toolkit_cli()\n File \"c:\\python34\\lib\\site-packages\\jupyter_console\\ptshell.py\", line 404, in init_prompt_toolkit_cli\n self.pt_cli = CommandLineInterface(app, eventloop=self._eventloop)\n File \"c:\\python34\\lib\\site-packages\\prompt_toolkit\\interface.py\", line 80, in __init__\n self.output = output or create_output()\n File \"c:\\python34\\lib\\site-packages\\prompt_toolkit\\shortcuts.py\", line 114, in create_output\n return Win32Output(stdout)\n File \"c:\\python34\\lib\\site-packages\\prompt_toolkit\\terminal\\win32_output.py\", line 80, in __init__\n info = self.get_win32_screen_buffer_info()\n File \"c:\\python34\\lib\\site-packages\\prompt_toolkit\\terminal\\win32_output.py\", line 150, in get_win32_screen_buffer_info\n raise NoConsoleScreenBufferError\nprompt_toolkit.terminal.win32_output.NoConsoleScreenBufferError: No Windows console found. Are you running cmd.exe?\n```\n\nIt seems even though it should load, `prompt_toolkit` does not like that Emacs is 1) on Windows and 2) is not in a known shell. I imagine this isn't anything to do with Emacs, as this shouldn't be any different than starting any other type of console from within the editor. Is this fixable? It seems to just be that `prompt_toolkit` doesn't know what it is executing inside. \n\nAnyways, thanks for the IPython 5 release, I really like the new REPL and completion, but being able to use it with Emacs as I have been is important to me as well. Hopefully the fix is as simple as adding some sort of Emacs clause to `get_win32_screen_buffer_info`.\n","author":{"url":"https://github.com/ThatGeoGuy","@type":"Person","name":"ThatGeoGuy"},"datePublished":"2016-07-08T16:47:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/9725/ipython/issues/9725"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7bbc54c5-5834-64ca-7e14-d84953710b1b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B23E:38C5E:AB3DE5:F72D1F:6A4E4538 |
| html-safe-nonce | ac8fa2fcdd91f9ecb9c0b6523ac9c79823cd2004332771e2b819ef4de99d3f1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjNFOjM4QzVFOkFCM0RFNTpGNzJEMUY6NkE0RTQ1MzgiLCJ2aXNpdG9yX2lkIjoiNDk0OTg2MTkwODQ5NDU5NTEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | de01f304bc79a3e08ff8360a3599b20e0a5664010cadc9e9f95ce4712666bf76 |
| hovercard-subject-tag | issue:164571075 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ipython/ipython/9725/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9948e717c71433c013863de4f63388aff7d6fccf51d512ccd295bdc3eb18c576/ipython/ipython/issues/9725 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9948e717c71433c013863de4f63388aff7d6fccf51d512ccd295bdc3eb18c576/ipython/ipython/issues/9725 |
| og:image:alt | Hi all, I have successfully used IPython from within an Emacs buffer in the past, usually by using the jupyter console command. My basic config uses the following: (setq-default python-shell-interp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ThatGeoGuy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/ipython/ipython git https://github.com/ipython/ipython.git |
| octolytics-dimension-user_id | 230453 |
| octolytics-dimension-user_login | ipython |
| octolytics-dimension-repository_id | 658518 |
| octolytics-dimension-repository_nwo | ipython/ipython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 658518 |
| octolytics-dimension-repository_network_root_nwo | ipython/ipython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9fabff9b8b127e686a3ec86f91422e818056ca2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width