René's URL Explorer Experiment


Title: Bpython breaks when printing large data structures · Issue #1037 · bpython/bpython · GitHub

Open Graph Title: Bpython breaks when printing large data structures · Issue #1037 · bpython/bpython

X Title: Bpython breaks when printing large data structures · Issue #1037 · bpython/bpython

Description: I'm surprised I haven't found another issue raised about this, or maybe I missed it. This is a frequent problem for me. If I am in the bpython shell and try to print out a large data structure, the shell crashes and it is frustrating. Th...

Open Graph Description: I'm surprised I haven't found another issue raised about this, or maybe I missed it. This is a frequent problem for me. If I am in the bpython shell and try to print out a large data structure, the...

X Description: I'm surprised I haven't found another issue raised about this, or maybe I missed it. This is a frequent problem for me. If I am in the bpython shell and try to print out a large data struct...

Opengraph URL: https://github.com/bpython/bpython/issues/1037

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bpython breaks when printing large data structures","articleBody":"I'm surprised I haven't found another issue raised about this, or maybe I missed it.\n\nThis is a frequent problem for me. If I am in the `bpython` shell and try to print out a large data structure, the shell crashes and it is frustrating. The big selling point of entering the shell is to be interactive with the environment, which means sometimes I want to display my data.\n\nIn this specific instance, I have a nested list structure. that looks like this\n\n```\n[\n  [\"string\",\"string\",\"string\"..],\n  [\"string\",\"string\",\"string\"..],\n  ...\n]\n```\n\nWhen I do a bit of debugging\n```python\nsum([len(y) for x in my_nested_list[:50] for y in x])\n```\nI get `36453`. So this means the excerpt I'm going to \"print\" to my screen has 36,453 bytes of characters in it, spread across 30 nested lists.\n\nIn `bpython` shell, when I simply do\n```\n\u003e\u003e\u003e my_nested_list[:50]\n```\nThe shell crashes:\n```\nTraceback (most recent call last):\n  File \"/path/to/venv/bin/bpython\", line 8, in \u003cmodule\u003e\n    sys.exit(main())\n             ~~~~^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/bpython/curtsies.py\", line 245, in main\n    repl.mainloop(True, paste)\n    ~~~~~~~~~~~~~^^^^^^^^^^^^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/bpython/curtsies.py\", line 178, in mainloop\n    self.process_event_and_paint(e)\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/bpython/curtsies.py\", line 149, in process_event_and_paint\n    scrolled = self.window.render_to_terminal(array, cursor_pos)\n  File \"/path/to/venv/lib64/python3.13/site-packages/curtsies/window.py\", line 491, in render_to_terminal\n    self.scroll_down()\n    ~~~~~~~~~~~~~~~~^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/curtsies/window.py\", line 56, in scroll_down\n    with self.t.location(x=0, y=1000000):\n         ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^\n  File \"/usr/lib64/python3.13/contextlib.py\", line 141, in __enter__\n    return next(self.gen)\n  File \"/path/to/venv/lib64/python3.13/site-packages/blessed/terminal.py\", line 594, in location\n    self.stream.flush()\n    ~~~~~~~~~~~~~~~~~^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/bpython/curtsiesfrontend/repl.py\", line 623, in sigwinch_handler\n    cursor_dy = self.get_cursor_vertical_diff()\n  File \"/path/to/venv/lib64/python3.13/site-packages/bpython/curtsies.py\", line 118, in get_cursor_vertical_diff\n    return self.window.get_cursor_vertical_diff()\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/curtsies/window.py\", line 398, in get_cursor_vertical_diff\n    cursor_dy += self._get_cursor_vertical_diff_once()\n                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/curtsies/window.py\", line 406, in _get_cursor_vertical_diff_once\n    row, col = self.get_cursor_position()\n               ~~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/curtsies/window.py\", line 315, in get_cursor_position\n    return self.t.get_location()\n           ~~~~~~~~~~~~~~~~~~~^^\n  File \"/path/to/venv/lib64/python3.13/site-packages/blessed/terminal.py\", line 651, in get_location\n    match = self._query_response(\n        self.u7 or u'\\x1b[6n', self.caps['cursor_report'].re_compiled, timeout\n    )\n  File \"/path/to/venv/lib64/python3.13/site-packages/blessed/terminal.py\", line 528, in _query_response\n    self.stream.flush()\n    ~~~~~~~~~~~~~~~~~^^\nRuntimeError: reentrant call inside \u003c_io.BufferedWriter name='\u003cstdout\u003e'\u003e\n```","author":{"url":"https://github.com/truck-iguana","@type":"Person","name":"truck-iguana"},"datePublished":"2025-04-27T18:00:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1037/bpython/issues/1037"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f54af03d-ef9e-4332-88ca-5481005cbe74
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id96E0:197DB9:561F94:7AFBBD:69675315
html-safe-nonce7b98b8fe06c035f08f04611733e74d594a75c1f8d72d96eb0030e2e7937a0aa0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkUwOjE5N0RCOTo1NjFGOTQ6N0FGQkJEOjY5Njc1MzE1IiwidmlzaXRvcl9pZCI6IjY0MjIxODU1NDYzMDkxMjg5ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac60ed89250ed5272838da8357184e85fa9674aadf1ea74e15a417f9f99ca326cd
hovercard-subject-tagissue:3023233337
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/bpython/bpython/1037/issue_layout
twitter:imagehttps://opengraph.githubassets.com/95f4633bd082c44e7f6593768188976f649e9b64446fbaf11c8af90f8d6dd91f/bpython/bpython/issues/1037
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/95f4633bd082c44e7f6593768188976f649e9b64446fbaf11c8af90f8d6dd91f/bpython/bpython/issues/1037
og:image:altI'm surprised I haven't found another issue raised about this, or maybe I missed it. This is a frequent problem for me. If I am in the bpython shell and try to print out a large data structure, the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametruck-iguana
hostnamegithub.com
expected-hostnamegithub.com
None1a6a4ac66aaa8be0077b72a69fd56fb51cd11215a1e31f0365079e012987234a
turbo-cache-controlno-preview
go-importgithub.com/bpython/bpython git https://github.com/bpython/bpython.git
octolytics-dimension-user_id8071396
octolytics-dimension-user_loginbpython
octolytics-dimension-repository_id21508865
octolytics-dimension-repository_nwobpython/bpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21508865
octolytics-dimension-repository_network_root_nwobpython/bpython
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
release045909cd564d790cacd96dcb8722039dff679d63
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/bpython/bpython/issues/1037#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbpython%2Fbpython%2Fissues%2F1037
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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%2Fbpython%2Fbpython%2Fissues%2F1037
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=bpython%2Fbpython
Reloadhttps://github.com/bpython/bpython/issues/1037
Reloadhttps://github.com/bpython/bpython/issues/1037
Reloadhttps://github.com/bpython/bpython/issues/1037
bpython https://github.com/bpython
bpythonhttps://github.com/bpython/bpython
Please reload this pagehttps://github.com/bpython/bpython/issues/1037
Notifications https://github.com/login?return_to=%2Fbpython%2Fbpython
Fork 252 https://github.com/login?return_to=%2Fbpython%2Fbpython
Star 2.8k https://github.com/login?return_to=%2Fbpython%2Fbpython
Code https://github.com/bpython/bpython
Issues 143 https://github.com/bpython/bpython/issues
Pull requests 4 https://github.com/bpython/bpython/pulls
Actions https://github.com/bpython/bpython/actions
Projects 0 https://github.com/bpython/bpython/projects
Wiki https://github.com/bpython/bpython/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/bpython/bpython/security
Please reload this pagehttps://github.com/bpython/bpython/issues/1037
Insights https://github.com/bpython/bpython/pulse
Code https://github.com/bpython/bpython
Issues https://github.com/bpython/bpython/issues
Pull requests https://github.com/bpython/bpython/pulls
Actions https://github.com/bpython/bpython/actions
Projects https://github.com/bpython/bpython/projects
Wiki https://github.com/bpython/bpython/wiki
Security https://github.com/bpython/bpython/security
Insights https://github.com/bpython/bpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/bpython/bpython/issues/1037
New issuehttps://github.com/login?return_to=https://github.com/bpython/bpython/issues/1037
Bpython breaks when printing large data structureshttps://github.com/bpython/bpython/issues/1037#top
https://github.com/truck-iguana
https://github.com/truck-iguana
truck-iguanahttps://github.com/truck-iguana
on Apr 27, 2025https://github.com/bpython/bpython/issues/1037#issue-3023233337
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.