René's URL Explorer Experiment


Title: gh-152260: Add curses.scr_dump(), scr_restore(), scr_init() and scr_set() by serhiy-storchaka · Pull Request #152261 · python/cpython · GitHub

Open Graph Title: gh-152260: Add curses.scr_dump(), scr_restore(), scr_init() and scr_set() by serhiy-storchaka · Pull Request #152261 · python/cpython

X Title: gh-152260: Add curses.scr_dump(), scr_restore(), scr_init() and scr_set() by serhiy-storchaka · Pull Request #152261 · python/cpython

Description: Add curses.scr_dump(), scr_restore(), scr_init() and scr_set(), the module-level functions that dump the whole screen to a file and restore it -- the screen-wide counterpart of window.putwin()/getwin(). Unlike putwin()/getwin(), which take a Python file object (mirroring C putwin(WINDOW *, FILE *)), the C scr_* functions are filename-based (they fopen internally), so these wrappers take a filename: a str or a path-like object. The restored screen is internal curses state (the virtual screen), not a readable window, so the test checks the round-trip by comparing dump files: dump, change the screen, restore, dump again, and assert the two dumps are byte-for-byte identical. Issue: gh-152260

Open Graph Description: Add curses.scr_dump(), scr_restore(), scr_init() and scr_set(), the module-level functions that dump the whole screen to a file and restore it -- the screen-wide counterpart of window.putwin()/getw...

X Description: Add curses.scr_dump(), scr_restore(), scr_init() and scr_set(), the module-level functions that dump the whole screen to a file and restore it -- the screen-wide counterpart of window.putwin()/getw...

Opengraph URL: https://github.com/python/cpython/pull/152261

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cfbc42ee-daf7-37ab-661a-eb8dd2611897
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD7A8:2B2949:C26FD:107A02:6A532275
html-safe-noncecb41bbd55f84f0cc752ae0b9044901ae19e2696b728c5afcd81d8602cb9e9375
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0E4OjJCMjk0OTpDMjZGRDoxMDdBMDI6NkE1MzIyNzUiLCJ2aXNpdG9yX2lkIjoiNjE1MTk0NTUxNTc0MDEyNTMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacca0759d5bf048eaee7607889637ec92d7dcf3a226511761392576e6a0fbd8bc5
hovercard-subject-tagpull_request:3941602468
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/152261/files
twitter:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
og:image:altAdd curses.scr_dump(), scr_restore(), scr_init() and scr_set(), the module-level functions that dump the whole screen to a file and restore it -- the screen-wide counterpart of window.putwin()/getw...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/152261/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F152261%2Ffiles
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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2Fpython%2Fcpython%2Fpull%2F152261%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/152261/files
Reloadhttps://github.com/python/cpython/pull/152261/files
Reloadhttps://github.com/python/cpython/pull/152261/files
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
serhiy-storchaka:curses-scr-dumphttps://github.com/serhiy-storchaka/cpython/tree/curses-scr-dump
Conversation 4 https://github.com/python/cpython/pull/152261
Commits 4 https://github.com/python/cpython/pull/152261/commits
Checks 52 https://github.com/python/cpython/pull/152261/checks
Files changed https://github.com/python/cpython/pull/152261/files
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
gh-152260: Add curses.scr_dump(), scr_restore(), scr_init() and scr_set() https://github.com/python/cpython/pull/152261/files#top
Show all changes 4 commits https://github.com/python/cpython/pull/152261/files
a0546a5 gh-152260: Add curses.scr_dump(), scr_restore(), scr_init() and scr_s… serhiy-storchaka Jun 26, 2026 https://github.com/python/cpython/pull/152261/commits/a0546a50151335ba52e0124a165f48b805390409
df15c09 Apply suggestion from @serhiy-storchaka serhiy-storchaka Jun 26, 2026 https://github.com/python/cpython/pull/152261/commits/df15c09ee83ed49a0979439979b7c31a0c2505da
c05f51c Merge remote-tracking branch 'upstream/main' into curses-scr-dump serhiy-storchaka Jun 26, 2026 https://github.com/python/cpython/pull/152261/commits/c05f51cc0ed306e942635b5a9c46c48970a34e5e
637352d Merge remote-tracking branch 'origin/curses-scr-dump' into curses-scr… serhiy-storchaka Jun 26, 2026 https://github.com/python/cpython/pull/152261/commits/637352d0ff4494ea919db07c00ec57b3f0d4734b
Clear filters https://github.com/python/cpython/pull/152261/files
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
curses.rst https://github.com/python/cpython/pull/152261/files#diff-cb5622768373b8c93cc8eee30dfb041108783bb419d9eaf205501989cea0049f
3.16.rst https://github.com/python/cpython/pull/152261/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
test_curses.py https://github.com/python/cpython/pull/152261/files#diff-d8a49e57c7f50f48b6ae331ca0dcd3634ed1b1d35d10601c57b15ba405fbb765
2026-06-26-15-10-00.gh-issue-152260.Rk4nP9.rst https://github.com/python/cpython/pull/152261/files#diff-f9f74e42179edcf4257071d4cff952c5a6099809d6c3296bce7e40550e92ae66
_cursesmodule.c https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
_cursesmodule.c.h https://github.com/python/cpython/pull/152261/files#diff-3712cb338691dd25b68632e5dae69b904aff02ecc7348a2c792d4c0acf007d8a
Doc/library/curses.rsthttps://github.com/python/cpython/pull/152261/files#diff-cb5622768373b8c93cc8eee30dfb041108783bb419d9eaf205501989cea0049f
View file https://github.com/serhiy-storchaka/cpython/blob/637352d0ff4494ea919db07c00ec57b3f0d4734b/Doc/library/curses.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/152261/{{ revealButtonHref }}
https://github.com/python/cpython/pull/152261/files#diff-cb5622768373b8c93cc8eee30dfb041108783bb419d9eaf205501989cea0049f
https://github.com/python/cpython/pull/152261/files#diff-cb5622768373b8c93cc8eee30dfb041108783bb419d9eaf205501989cea0049f
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L116
Doc/whatsnew/3.16.rsthttps://github.com/python/cpython/pull/152261/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
View file https://github.com/serhiy-storchaka/cpython/blob/637352d0ff4494ea919db07c00ec57b3f0d4734b/Doc/whatsnew/3.16.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/152261/{{ revealButtonHref }}
https://github.com/python/cpython/pull/152261/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
https://github.com/python/cpython/pull/152261/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
Lib/test/test_curses.pyhttps://github.com/python/cpython/pull/152261/files#diff-d8a49e57c7f50f48b6ae331ca0dcd3634ed1b1d35d10601c57b15ba405fbb765
View file https://github.com/serhiy-storchaka/cpython/blob/637352d0ff4494ea919db07c00ec57b3f0d4734b/Lib/test/test_curses.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/152261/{{ revealButtonHref }}
https://github.com/python/cpython/pull/152261/files#diff-d8a49e57c7f50f48b6ae331ca0dcd3634ed1b1d35d10601c57b15ba405fbb765
vstinnerhttps://github.com/vstinner
Jun 26, 2026https://github.com/python/cpython/pull/152261/files#r3482218057
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
https://github.com/python/cpython/pull/152261/files#diff-d8a49e57c7f50f48b6ae331ca0dcd3634ed1b1d35d10601c57b15ba405fbb765
Misc/NEWS.d/next/Library/2026-06-26-15-10-00.gh-issue-152260.Rk4nP9.rsthttps://github.com/python/cpython/pull/152261/files#diff-f9f74e42179edcf4257071d4cff952c5a6099809d6c3296bce7e40550e92ae66
View file https://github.com/serhiy-storchaka/cpython/blob/637352d0ff4494ea919db07c00ec57b3f0d4734b/Misc/NEWS.d/next/Library/2026-06-26-15-10-00.gh-issue-152260.Rk4nP9.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/152261/{{ revealButtonHref }}
Modules/_cursesmodule.chttps://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
View file https://github.com/serhiy-storchaka/cpython/blob/637352d0ff4494ea919db07c00ec57b3f0d4734b/Modules/_cursesmodule.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/152261/{{ revealButtonHref }}
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
https://github.com/python/cpython/pull/152261/files#diff-f77a12c8531c26a47799058e7b02fd9b43753a458b5ed1cefc6693685aa098ce
Modules/clinic/_cursesmodule.c.hhttps://github.com/python/cpython/pull/152261/files#diff-3712cb338691dd25b68632e5dae69b904aff02ecc7348a2c792d4c0acf007d8a
View file https://github.com/serhiy-storchaka/cpython/blob/637352d0ff4494ea919db07c00ec57b3f0d4734b/Modules/clinic/_cursesmodule.c.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
Please reload this pagehttps://github.com/python/cpython/pull/152261/files
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.