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
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:cfbc42ee-daf7-37ab-661a-eb8dd2611897 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D7A8:2B2949:C26FD:107A02:6A532275 |
| html-safe-nonce | cb41bbd55f84f0cc752ae0b9044901ae19e2696b728c5afcd81d8602cb9e9375 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0E4OjJCMjk0OTpDMjZGRDoxMDdBMDI6NkE1MzIyNzUiLCJ2aXNpdG9yX2lkIjoiNjE1MTk0NTUxNTc0MDEyNTMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ca0759d5bf048eaee7607889637ec92d7dcf3a226511761392576e6a0fbd8bc5 |
| hovercard-subject-tag | pull_request:3941602468 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/152261/files |
| twitter:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width