René's URL Explorer Experiment


Title: bpo-37827: IDLE shell handling of \r and \b control chars by taleinat · Pull Request #15211 · python/cpython · GitHub

Open Graph Title: bpo-37827: IDLE shell handling of \r and \b control chars by taleinat · Pull Request #15211 · python/cpython

X Title: bpo-37827: IDLE shell handling of \r and \b control chars by taleinat · Pull Request #15211 · python/cpython

Description: This is a first working version, looking for some user testing and feedback! This allows most progress bars to just work in IDLE, rather than flooding the shell window and sometimes slowing it down to a crawl. More generally, this makes IDLE's shell behave more similarly to a plain Python shell in a terminal. Note that some progress bar libraries, e.g. tqdm, now "just work"! In some cases some integration might be required; for example, TensorFlow does several checks on the sys.stdout file-like object to decide whether to use these control characters. Hacking TensorFlow to override that check makes it work as intended in the IDLE shell with this change. Note that this also currently includes a subtle change which attempts to avoid clobbering the user input when output is written after a command has finished executing, e.g. by a separate thread. But that's not the main addition here. https://bugs.python.org/issue37827

Open Graph Description: This is a first working version, looking for some user testing and feedback! This allows most progress bars to just work in IDLE, rather than flooding the shell window and sometimes slowing it down...

X Description: This is a first working version, looking for some user testing and feedback! This allows most progress bars to just work in IDLE, rather than flooding the shell window and sometimes slowing it down...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:197bf9c3-6288-701c-0ffd-1e4c980b7ea2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB338:178041:1A83561:246E77A:696AA635
html-safe-nonce6375ded6b30471dbee960d8ea211c77969d440a2edd4fea8377b72abc5aeb4f1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzM4OjE3ODA0MToxQTgzNTYxOjI0NkU3N0E6Njk2QUE2MzUiLCJ2aXNpdG9yX2lkIjoiMzAzODU2ODE2ODMwMTQzODUxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd3445cb2b5ef2f6a4419c783e21e63b4899f2faaaa064d8cc021e31894ad0059
hovercard-subject-tagpull_request:306288065
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/15211/files
twitter:imagehttps://avatars.githubusercontent.com/u/532281?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/532281?s=400&v=4
og:image:altThis is a first working version, looking for some user testing and feedback! This allows most progress bars to just work in IDLE, rather than flooding the shell window and sometimes slowing it down...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonea51f97dbb9326f71c08ecb61577457d543c602124d1a2672871258ef37ac5261
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
release4bd0eac606c70914085176ef312ebdcd97a8cdf1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/15211/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F15211%2Ffiles
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%2Fpython%2Fcpython%2Fpull%2F15211%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/15211/files
Reloadhttps://github.com/python/cpython/pull/15211/files
Reloadhttps://github.com/python/cpython/pull/15211/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/15211/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/15211/files
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 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
taleinathttps://github.com/taleinat
python:masterhttps://github.com/python/cpython/tree/master
taleinat:bpo-23220/idle-shell-control-charshttps://github.com/taleinat/cpython/tree/bpo-23220/idle-shell-control-chars
Conversation 8 https://github.com/python/cpython/pull/15211
Commits 13 https://github.com/python/cpython/pull/15211/commits
Checks 0 https://github.com/python/cpython/pull/15211/checks
Files changed https://github.com/python/cpython/pull/15211/files
Please reload this pagehttps://github.com/python/cpython/pull/15211/files
bpo-37827: IDLE shell handling of \r and \b control chars https://github.com/python/cpython/pull/15211/files#top
Show all changes 13 commits https://github.com/python/cpython/pull/15211/files
443db01 optimize PyShell.write() taleinat Aug 11, 2019 https://github.com/python/cpython/pull/15211/commits/443db0199749ae5895b8a80e9b58285a844c9050
ebf51d0 first working version of control char handling in shell taleinat Aug 11, 2019 https://github.com/python/cpython/pull/15211/commits/ebf51d0d9fff4ba1c93d4fc38c6d4aaaea4307dd
b611193 improved, clarified, plus fixes taleinat Aug 11, 2019 https://github.com/python/cpython/pull/15211/commits/b611193e0f56e4b642af3b996ae0e529e05b8bc5
83e41cf just move the cursor rather than truncate the line taleinat Aug 11, 2019 https://github.com/python/cpython/pull/15211/commits/83e41cf0cfa408c534f6b7ad0b5faba30642181c
3cbd2fd implemented handling of output cursor taleinat Aug 11, 2019 https://github.com/python/cpython/pull/15211/commits/3cbd2fd5d7581977fdfc61262fcdef60762c7d78
1135761 some tests and a couple of small fixes taleinat Aug 11, 2019 https://github.com/python/cpython/pull/15211/commits/11357617ae23cccd80afe6e086de98a384dbebe8
1d32615 another test and important edge-case fix taleinat Aug 12, 2019 https://github.com/python/cpython/pull/15211/commits/1d32615725f1ca697be75d2cf8d76aff1cd848c4
4dde76e major optimization: return "cursor_back" rather than "cursor" taleinat Aug 12, 2019 https://github.com/python/cpython/pull/15211/commits/4dde76e0794dc82647a9e94fa46cfedf0da59d5d
017bf8a minor code cleanup taleinat Aug 12, 2019 https://github.com/python/cpython/pull/15211/commits/017bf8a48298686c704a7d84f7bc5cf3800fd1ae
04b8aba avoid unnecessary re-writes with controls chars at start or end taleinat Aug 12, 2019 https://github.com/python/cpython/pull/15211/commits/04b8aba602e8d4891919f64ecd76011df7476fab
1903c56 make the internal write() function a staticmethod taleinat Aug 13, 2019 https://github.com/python/cpython/pull/15211/commits/1903c564899c2e5e9ce073b835aad6211881486a
93c5bc5 update idle.rst taleinat Aug 13, 2019 https://github.com/python/cpython/pull/15211/commits/93c5bc583f33c28bd38ccf64403454496b934fdd
6e4c73c add entries to NEWS and What's New taleinat Aug 13, 2019 https://github.com/python/cpython/pull/15211/commits/6e4c73cf1d04d6ff6f370a74ca2fe91452b95f43
Clear filters https://github.com/python/cpython/pull/15211/files
Please reload this pagehttps://github.com/python/cpython/pull/15211/files
Please reload this pagehttps://github.com/python/cpython/pull/15211/files
idle.rst https://github.com/python/cpython/pull/15211/files#diff-e2275d85823afd7ad0bd9eebef9bb28bd84ba901700249f0e8cfe6b04a41089e
3.7.rst https://github.com/python/cpython/pull/15211/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
3.8.rst https://github.com/python/cpython/pull/15211/files#diff-fc26ec44ce02bff5ba0fc0c1c750748ff5dea3bec156c6fdf3f666d943e81992
test_pyshell.py https://github.com/python/cpython/pull/15211/files#diff-e6d79f68ade9e5c24330a753ce7f64dd7c053b1ce242483522571fd88049d24c
pyshell.py https://github.com/python/cpython/pull/15211/files#diff-f6ced3d8ba872fb8904aa7cf07512890be864c5b00ae0ccf3d0c3edff0a03567
2019-08-13-10-34-26.bpo-37827.S6vxP3.rst https://github.com/python/cpython/pull/15211/files#diff-846ef3f28a423ea1d07ecdd662b2fcd411090cb3739346003b76434f9f37f568
Doc/library/idle.rsthttps://github.com/python/cpython/pull/15211/files#diff-e2275d85823afd7ad0bd9eebef9bb28bd84ba901700249f0e8cfe6b04a41089e
View file https://github.com/taleinat/cpython/blob/6e4c73cf1d04d6ff6f370a74ca2fe91452b95f43/Doc/library/idle.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15211/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15211/files#diff-e2275d85823afd7ad0bd9eebef9bb28bd84ba901700249f0e8cfe6b04a41089e
https://github.com/python/cpython/pull/15211/files#diff-e2275d85823afd7ad0bd9eebef9bb28bd84ba901700249f0e8cfe6b04a41089e
Doc/whatsnew/3.7.rsthttps://github.com/python/cpython/pull/15211/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
View file https://github.com/taleinat/cpython/blob/6e4c73cf1d04d6ff6f370a74ca2fe91452b95f43/Doc/whatsnew/3.7.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15211/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15211/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
https://github.com/python/cpython/pull/15211/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
Doc/whatsnew/3.8.rsthttps://github.com/python/cpython/pull/15211/files#diff-fc26ec44ce02bff5ba0fc0c1c750748ff5dea3bec156c6fdf3f666d943e81992
View file https://github.com/taleinat/cpython/blob/6e4c73cf1d04d6ff6f370a74ca2fe91452b95f43/Doc/whatsnew/3.8.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15211/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15211/files#diff-fc26ec44ce02bff5ba0fc0c1c750748ff5dea3bec156c6fdf3f666d943e81992
https://github.com/python/cpython/pull/15211/files#diff-fc26ec44ce02bff5ba0fc0c1c750748ff5dea3bec156c6fdf3f666d943e81992
Lib/idlelib/idle_test/test_pyshell.pyhttps://github.com/python/cpython/pull/15211/files#diff-e6d79f68ade9e5c24330a753ce7f64dd7c053b1ce242483522571fd88049d24c
View file https://github.com/taleinat/cpython/blob/6e4c73cf1d04d6ff6f370a74ca2fe91452b95f43/Lib/idlelib/idle_test/test_pyshell.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15211/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15211/files#diff-e6d79f68ade9e5c24330a753ce7f64dd7c053b1ce242483522571fd88049d24c
Lib/idlelib/pyshell.pyhttps://github.com/python/cpython/pull/15211/files#diff-f6ced3d8ba872fb8904aa7cf07512890be864c5b00ae0ccf3d0c3edff0a03567
View file https://github.com/taleinat/cpython/blob/6e4c73cf1d04d6ff6f370a74ca2fe91452b95f43/Lib/idlelib/pyshell.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15211/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15211/files#diff-f6ced3d8ba872fb8904aa7cf07512890be864c5b00ae0ccf3d0c3edff0a03567
https://github.com/python/cpython/pull/15211/files#diff-f6ced3d8ba872fb8904aa7cf07512890be864c5b00ae0ccf3d0c3edff0a03567
https://github.com/python/cpython/pull/15211/files#diff-f6ced3d8ba872fb8904aa7cf07512890be864c5b00ae0ccf3d0c3edff0a03567
https://github.com/python/cpython/pull/15211/files#diff-f6ced3d8ba872fb8904aa7cf07512890be864c5b00ae0ccf3d0c3edff0a03567
Misc/NEWS.d/next/IDLE/2019-08-13-10-34-26.bpo-37827.S6vxP3.rsthttps://github.com/python/cpython/pull/15211/files#diff-846ef3f28a423ea1d07ecdd662b2fcd411090cb3739346003b76434f9f37f568
View file https://github.com/taleinat/cpython/blob/6e4c73cf1d04d6ff6f370a74ca2fe91452b95f43/Misc/NEWS.d/next/IDLE/2019-08-13-10-34-26.bpo-37827.S6vxP3.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15211/{{ revealButtonHref }}
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.