René's URL Explorer Experiment


Title: %magic% doesn't work in Emacs 25.1-2 ipython (run-python) buffer on Windows 7. · Issue #10211 · ipython/ipython · GitHub

Open Graph Title: %magic% doesn't work in Emacs 25.1-2 ipython (run-python) buffer on Windows 7. · Issue #10211 · ipython/ipython

X Title: %magic% doesn't work in Emacs 25.1-2 ipython (run-python) buffer on Windows 7. · Issue #10211 · ipython/ipython

Description: Programmer - normally I use ipython in emacs, in particular Ubuntu, but that machine is down for the count at the moment and so I'm, reluctantly, using windows and reconstructing the environment I like. Since there's a part not working t...

Open Graph Description: Programmer - normally I use ipython in emacs, in particular Ubuntu, but that machine is down for the count at the moment and so I'm, reluctantly, using windows and reconstructing the environment I ...

X Description: Programmer - normally I use ipython in emacs, in particular Ubuntu, but that machine is down for the count at the moment and so I'm, reluctantly, using windows and reconstructing the environmen...

Opengraph URL: https://github.com/ipython/ipython/issues/10211

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"%magic% doesn't work in Emacs 25.1-2 ipython (run-python) buffer on Windows 7.","articleBody":"Programmer -  normally I use ipython in emacs, in particular Ubuntu, but that machine is down for the count at the moment and so I'm, reluctantly, using windows and reconstructing the environment I like.  Since there's a part not working thought I might have a try at the code.\r\n\r\nIPython 5.1.0, Emacs 25.1-2 on Windows 7.\r\n\r\nI run %magic% and get this trace.  (same operation in ipython in a cmd window works fine)\r\n\r\n```\r\n(Pdb) c\r\n\r\nBdbQuitTraceback (most recent call last)\r\n\u003cipython-input-6-d4375e0cd73a\u003e in \u003cmodule\u003e()\r\n----\u003e 1 get_ipython().magic(u'magic %')\r\n\r\nc:\\python27\\lib\\site-packages\\IPython\\core\\interactiveshell.pyc in magic(self, arg_s)\r\n   2156         magic_name, _, magic_arg_s = arg_s.partition(' ')\r\n   2157         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)\r\n-\u003e 2158         return self.run_line_magic(magic_name, magic_arg_s)\r\n   2159 \r\n   2160     #-------------------------------------------------------------------------\r\n\r\nc:\\python27\\lib\\site-packages\\IPython\\core\\interactiveshell.pyc in run_line_magic(self, magic_name, line)\r\n   2077                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals\r\n   2078             with self.builtin_trap:\r\n-\u003e 2079                 result = fn(*args,**kwargs)\r\n   2080             return result\r\n   2081 \r\n\r\n\u003cdecorator-gen-32\u003e in magic(self, parameter_s)\r\n\r\nc:\\python27\\lib\\site-packages\\IPython\\core\\magic.pyc in \u003clambda\u003e(f, *a, **k)\r\n    186     # but it's overkill for just that one bit of state.\r\n    187     def magic_deco(arg):\r\n--\u003e 188         call = lambda f, *a, **k: f(*a, **k)\r\n    189 \r\n    190         if callable(arg):\r\n\r\nc:\\python27\\lib\\site-packages\\IPython\\core\\magics\\basic.pyc in magic(self, parameter_s)\r\n    257        str(self.lsmagic()),\r\n    258        ]\r\n--\u003e 259         page.page('\\n'.join(out))\r\n    260 \r\n    261 \r\n\r\nc:\\python27\\lib\\site-packages\\IPython\\core\\page.py in page(data, start, screen_lines, pager_cmd)\r\n    273 \r\n    274     # fallback on default pager\r\n--\u003e 275     return pager_page(data, start, screen_lines, pager_cmd)\r\n    276 \r\n    277 \r\n\r\nc:\\python27\\lib\\site-packages\\IPython\\core\\page.py in pager_page(strng, start, screen_lines, pager_cmd)\r\n    186     numlines = max(num_newlines,int(len_str/80)+1)\r\n    187     pdb.set_trace()\r\n--\u003e 188     screen_lines_def = get_terminal_size()[1]\r\n    189 \r\n    190     # auto-determine screen size\r\n\r\nc:\\python27\\lib\\site-packages\\IPython\\core\\page.py in pager_page(strng, start, screen_lines, pager_cmd)\r\n    186     numlines = max(num_newlines,int(len_str/80)+1)\r\n    187     pdb.set_trace()\r\n--\u003e 188     screen_lines_def = get_terminal_size()[1]\r\n    189 \r\n    190     # auto-determine screen size\r\n\r\nc:\\python27\\lib\\bdb.pyc in trace_dispatch(self, frame, event, arg)\r\n     47             return # None\r\n     48         if event == 'line':\r\n---\u003e 49             return self.dispatch_line(frame)\r\n     50         if event == 'call':\r\n     51             return self.dispatch_call(frame, arg)\r\n\r\nc:\\python27\\lib\\bdb.pyc in dispatch_line(self, frame)\r\n     65     def dispatch_line(self, frame):\r\n     66         if self.stop_here(frame) or self.break_here(frame):\r\n---\u003e 67             self.user_line(frame)\r\n     68             if self.quitting: raise BdbQuit\r\n     69         return self.trace_dispatch\r\n\r\nBdbQuit: \r\n```\r\n\r\nIt's crashing basically because get_terminal_size isn't working - here:\r\n\r\n```\r\n    def _get_terminal_size(fd):\r\n        pdb.set_trace()\r\n        columns = lines = 0\r\n\r\n        try:\r\n            handle = _handles[fd]\r\n            csbi = create_string_buffer(22)\r\n            res = windll.kernel32.GetConsoleScreenBufferInfo(handle, csbi)\r\n            if res:\r\n                res = struct.unpack(\"hhhhHhhhhhh\", csbi.raw)\r\n                left, top, right, bottom = res[5:9]\r\n                columns = right - left + 1\r\n                lines = bottom - top + 1\r\n        except Exception:\r\n            pass\r\n```\r\n\r\nwindll.kernel32.GetConsoleScreenBufferInfo(handle, csbi) fails and returns 0.  I can, later on, in pdb plug in a reasonable value for LINES and it works.\r\n\r\nWhat's needed to have a crack at this?","author":{"url":"https://github.com/patfla","@type":"Person","name":"patfla"},"datePublished":"2017-01-28T00:56:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/10211/ipython/issues/10211"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:91914ea0-53e4-f478-05cd-f099ab473e18
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA53C:1A0CEA:B1C00B:F196C7:6A4C8FBD
html-safe-nonce1f21a3661352519ad386b3e672029f38460035b0b8fe21fa0370b9aa824524f0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTNDOjFBMENFQTpCMUMwMEI6RjE5NkM3OjZBNEM4RkJEIiwidmlzaXRvcl9pZCI6IjY3MjM4Mzg1MzcwODk0NTQwMTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5382673a579861ad97b360f8d301b7d0ed633c9574e453087b0c58315dc1b3fd
hovercard-subject-tagissue:203775593
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ipython/ipython/10211/issue_layout
twitter:imagehttps://opengraph.githubassets.com/885829aa67f060dbb530949a19e34851d8e150eac0b1c65d5039741b9069c767/ipython/ipython/issues/10211
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/885829aa67f060dbb530949a19e34851d8e150eac0b1c65d5039741b9069c767/ipython/ipython/issues/10211
og:image:altProgrammer - normally I use ipython in emacs, in particular Ubuntu, but that machine is down for the count at the moment and so I'm, reluctantly, using windows and reconstructing the environment I ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepatfla
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
go-importgithub.com/ipython/ipython git https://github.com/ipython/ipython.git
octolytics-dimension-user_id230453
octolytics-dimension-user_loginipython
octolytics-dimension-repository_id658518
octolytics-dimension-repository_nwoipython/ipython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id658518
octolytics-dimension-repository_network_root_nwoipython/ipython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7a2dede45637df6b92ddcfe2a557e67d4b5854ae
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ipython/ipython/issues/10211#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fipython%2Fipython%2Fissues%2F10211
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fipython%2Fipython%2Fissues%2F10211
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ipython%2Fipython
Reloadhttps://github.com/ipython/ipython/issues/10211
Reloadhttps://github.com/ipython/ipython/issues/10211
Reloadhttps://github.com/ipython/ipython/issues/10211
Please reload this pagehttps://github.com/ipython/ipython/issues/10211
ipython https://github.com/ipython
ipythonhttps://github.com/ipython/ipython
Please reload this pagehttps://github.com/ipython/ipython/issues/10211
Notifications https://github.com/login?return_to=%2Fipython%2Fipython
Fork 4.5k https://github.com/login?return_to=%2Fipython%2Fipython
Star 16.7k https://github.com/login?return_to=%2Fipython%2Fipython
Code https://github.com/ipython/ipython
Issues 1.3k https://github.com/ipython/ipython/issues
Pull requests 33 https://github.com/ipython/ipython/pulls
Actions https://github.com/ipython/ipython/actions
Projects https://github.com/ipython/ipython/projects
Wiki https://github.com/ipython/ipython/wiki
Security and quality 2 https://github.com/ipython/ipython/security
Insights https://github.com/ipython/ipython/pulse
Code https://github.com/ipython/ipython
Issues https://github.com/ipython/ipython/issues
Pull requests https://github.com/ipython/ipython/pulls
Actions https://github.com/ipython/ipython/actions
Projects https://github.com/ipython/ipython/projects
Wiki https://github.com/ipython/ipython/wiki
Security and quality https://github.com/ipython/ipython/security
Insights https://github.com/ipython/ipython/pulse
%magic% doesn't work in Emacs 25.1-2 ipython (run-python) buffer on Windows 7.https://github.com/ipython/ipython/issues/10211#top
https://github.com/patfla
patflahttps://github.com/patfla
on Jan 28, 2017https://github.com/ipython/ipython/issues/10211#issue-203775593
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.