René's URL Explorer Experiment


Title: Terminal interface based on prompt_toolkit by takluyver · Pull Request #9118 · ipython/ipython · GitHub

Open Graph Title: Terminal interface based on prompt_toolkit by takluyver · Pull Request #9118 · ipython/ipython

X Title: Terminal interface based on prompt_toolkit by takluyver · Pull Request #9118 · ipython/ipython

Description: This adds a new terminal interface using prompt_toolkit in place of readline. It's on top of my refactoring in #9070. You can test the new interface by running: python3 -m IPython.terminal.ptshell Multiline editing with syntax highlighting, persistent history and tab completion are all working. So far, I'm really impressed with prompt_toolkit: I've written about 100 lines to make that happen, and while it's taken some research, nothing I've had to do feels like a hack. Kudos to @jonathanslenders :-)

Open Graph Description: This adds a new terminal interface using prompt_toolkit in place of readline. It's on top of my refactoring in #9070. You can test the new interface by running: python3 -m IPython.terminal.ptsh...

X Description: This adds a new terminal interface using prompt_toolkit in place of readline. It's on top of my refactoring in #9070. You can test the new interface by running: python3 -m IPython.terminal....

Opengraph URL: https://github.com/ipython/ipython/pull/9118

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:24e4f83b-5c1b-d561-751d-8344bac30410
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD79E:0295:372399E:4936689:6A65575F
html-safe-nonceaa373624b4e33b1c36f5256c041256d04a303ad1dd3e179d579152ab0872500a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzlFOjAyOTU6MzcyMzk5RTo0OTM2Njg5OjZBNjU1NzVGIiwidmlzaXRvcl9pZCI6IjY5MTM4NDYyMDIzNDM5NzA2NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7bbb93646e18bc585fd12c12ebc3e73c99e64c8292db686f087c47ff469de6b8
hovercard-subject-tagpull_request:55466896
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
twitter:imagehttps://avatars.githubusercontent.com/u/327925?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/327925?s=400&v=4
og:image:altThis adds a new terminal interface using prompt_toolkit in place of readline. It's on top of my refactoring in #9070. You can test the new interface by running: python3 -m IPython.terminal.ptsh...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
turbo-cache-controlno-preview
diff-viewunified
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
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fipython%2Fipython%2Fpull%2F9118%2Fcommits%2Fe778cbacc703f6204637c45748340a5ce093e7f8
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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%2Fipython%2Fipython%2Fpull%2F9118%2Fcommits%2Fe778cbacc703f6204637c45748340a5ce093e7f8
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%2Fcommits&source=header-repo&source_repo=ipython%2Fipython
Reloadhttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Reloadhttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Reloadhttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Please reload this pagehttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
ipython https://github.com/ipython
ipythonhttps://github.com/ipython/ipython
Please reload this pagehttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Notifications https://github.com/login?return_to=%2Fipython%2Fipython
Fork 4.5k https://github.com/login?return_to=%2Fipython%2Fipython
Star 16.8k 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 30 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
Sign up for GitHub https://github.com/signup?return_to=%2Fipython%2Fipython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fipython%2Fipython%2Fissues%2Fnew%2Fchoose
Carreauhttps://github.com/Carreau
ipython:masterhttps://github.com/ipython/ipython/tree/master
takluyver:ptshellhttps://github.com/takluyver/ipython/tree/ptshell
Conversation 68 https://github.com/ipython/ipython/pull/9118
Commits 36 https://github.com/ipython/ipython/pull/9118/commits
Checks 0 https://github.com/ipython/ipython/pull/9118/checks
Files changed https://github.com/ipython/ipython/pull/9118/files
Please reload this pagehttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Terminal interface based on prompt_toolkit https://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8#top
Show all changes 36 commits https://github.com/ipython/ipython/pull/9118/files
85bfacf Initial code for new InteractiveShell subclass using prompt_toolkit takluyver Dec 22, 2015 https://github.com/ipython/ipython/pull/9118/commits/85bfacfd2213705f64c57a06d36ab9759b710c34
a9b0c6c Refine multiline behaviour takluyver Dec 23, 2015 https://github.com/ipython/ipython/pull/9118/commits/a9b0c6ca598179c4c07291f3cc4111a021d92078
f524604 Store history so prompt number increases takluyver Dec 23, 2015 https://github.com/ipython/ipython/pull/9118/commits/f52460428307785b7c5440cb62100f85fd022269
239389a Hook up command history and populate it from IPython's history DB takluyver Jan 8, 2016 https://github.com/ipython/ipython/pull/9118/commits/239389ae8394bc72f4ee3131880d8318729b343c
e870f74 Do sensible things on Ctrl-C and Ctrl-D takluyver Jan 8, 2016 https://github.com/ipython/ipython/pull/9118/commits/e870f74a0ccace04051f0687767c3758b3274b39
db2ff6f Add completion support takluyver Jan 8, 2016 https://github.com/ipython/ipython/pull/9118/commits/db2ff6f587b9d7ee1036832c68205df20c7ff9cc
ba5734e Improve order of completions takluyver Jan 8, 2016 https://github.com/ipython/ipython/pull/9118/commits/ba5734e80ca6c629ee5a6b90f275acaf04edd59d
fbb4e63 Nicer default colours takluyver Jan 8, 2016 https://github.com/ipython/ipython/pull/9118/commits/fbb4e634fed001b43a71d76d38012def5ee1a1c7
342b175 Add blank line before input prompt takluyver Jan 11, 2016 https://github.com/ipython/ipython/pull/9118/commits/342b17513a11fe906ff0a25b39ce7dee8beb0c64
e778cba Turn out prompt & traceback colours on when using prompt_toolkit takluyver Jan 12, 2016 https://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
5584533 Move printing blank line to before each input prompt takluyver Jan 12, 2016 https://github.com/ipython/ipython/pull/9118/commits/55845333e1d253107321299801fc055b9a46e885
4a9dcfd Don't try to complete on an empty line takluyver Jan 12, 2016 https://github.com/ipython/ipython/pull/9118/commits/4a9dcfdc275f54b18cb0a361857117f7b8a5e09c
535e240 Only use our Enter handling when the default buffer is active takluyver Jan 12, 2016 https://github.com/ipython/ipython/pull/9118/commits/535e24011597ff5c9c15cc423415bf259d759fbd
904d56e Enable history search with up arrow takluyver Jan 12, 2016 https://github.com/ipython/ipython/pull/9118/commits/904d56ef88ea9d98dff4bc43149527792f5a3b8b
3d5a073 Improve default colours for light & dark terminal backgrounds takluyver Jan 12, 2016 https://github.com/ipython/ipython/pull/9118/commits/3d5a073dae0e0976c49131d0d51ce28900b1e3d5
e9ee3ec Add config option for vi mode takluyver Jan 14, 2016 https://github.com/ipython/ipython/pull/9118/commits/e9ee3ec0000a5331a264337a30e5f02cea9c2723
cde57a3 Config options for syntax higlighting style takluyver Jan 14, 2016 https://github.com/ipython/ipython/pull/9118/commits/cde57a32a66a50637361122a0e190d7c65544058
0cb9e90 Python 2.7 support & highlighting in prompt_toolkit interface takluyver Jan 14, 2016 https://github.com/ipython/ipython/pull/9118/commits/0cb9e90494c27bb2aee1ff046348a0f2eeeb44c3
995b794 Add continuation prompts takluyver Jan 16, 2016 https://github.com/ipython/ipython/pull/9118/commits/995b7940fcf75078804b44fdd9feef5c44abac6a
c0fffd1 Write & borrow some inputhooks for prompt_toolkit takluyver Jan 16, 2016 https://github.com/ipython/ipython/pull/9118/commits/c0fffd17e4392b1d2434182406d5245a7dc65c99
a9ca5b1 More tweaks to highlighting colours takluyver Jan 18, 2016 https://github.com/ipython/ipython/pull/9118/commits/a9ca5b1b43881bbdc1d4cb4686f66617667cee9e
48013ca Add prompt_toolkit input hooks for wx takluyver Jan 18, 2016 https://github.com/ipython/ipython/pull/9118/commits/48013ca5e8b0f7cf853e2b76b74b448169834f97
1f47f59 Add inputhook for pyglet takluyver Jan 18, 2016 https://github.com/ipython/ipython/pull/9118/commits/1f47f59a7d4518e750009aedce596a150ad0a865
24fa5b7 Add GLUT input hook takluyver Jan 18, 2016 https://github.com/ipython/ipython/pull/9118/commits/24fa5b78c0f9e963a899c2e0c94f8f61be6428f8
f34eb22 Fix some deprecation warnings in GTK3 example takluyver Jan 18, 2016 https://github.com/ipython/ipython/pull/9118/commits/f34eb22e490f0876aeb269ca823b81e7cfee85ad
ae59e6e Initialise threads for pygtk input hook takluyver Jan 18, 2016 https://github.com/ipython/ipython/pull/9118/commits/ae59e6e44bfde48d33dd37d46f093a93788a903e
7da2783 Implement pre-filling prompt from set_next_input() takluyver Jan 18, 2016 https://github.com/ipython/ipython/pull/9118/commits/7da2783b15a56a229ebe76d0edf874ca5c95494f
0a16e9d Integrate colorama for coloured output on Windows takluyver Jan 19, 2016 https://github.com/ipython/ipython/pull/9118/commits/0a16e9d0e624a99578587eaa288ab1b6a3836a98
7300933 Fix %edit - editor attribute was missing takluyver Jan 21, 2016 https://github.com/ipython/ipython/pull/9118/commits/730093369725dbc19112e01c909bde40620aa999
0fe9565 Fix set_next_input on Python 2 takluyver Jan 27, 2016 https://github.com/ipython/ipython/pull/9118/commits/0fe95653b2e0091f97364b62d4fb83d58dd3a3be
b40a2dd Make behaviour more natural with blank lines at the end of input takluyver Jan 27, 2016 https://github.com/ipython/ipython/pull/9118/commits/b40a2dd0e08895c827eb936da6c8e8f5997cd51d
90e30a8 Add a mainloop() method to mimic existing shell API takluyver Feb 3, 2016 https://github.com/ipython/ipython/pull/9118/commits/90e30a8f28cc55e870c9a40a5e64a5238b143474
e938416 Config option to enable mouse support takluyver Feb 3, 2016 https://github.com/ipython/ipython/pull/9118/commits/e9384160dd1e213ed690cecffa11224dfcbe0037
ac0799c Disable continuation prompts to work with stable release of prompt_to… takluyver Feb 22, 2016 https://github.com/ipython/ipython/pull/9118/commits/ac0799c5812a9daaed1438311a1d75c7723399bf
67d7c40 Switch over to use prompt_toolkit in IPython takluyver Feb 22, 2016 https://github.com/ipython/ipython/pull/9118/commits/67d7c405d3ee45570b44d4c37a5c23b5f21068d8
7505eae Fix 'interactive' tests using pipes to a subprocess takluyver Feb 22, 2016 https://github.com/ipython/ipython/pull/9118/commits/7505eae52c463ab83b0b9ce6744af1fb837e3c05
Clear filters https://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Please reload this pagehttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Please reload this pagehttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
Prev https://github.com/ipython/ipython/pull/9118/commits/342b17513a11fe906ff0a25b39ce7dee8beb0c64
Next https://github.com/ipython/ipython/pull/9118/commits/55845333e1d253107321299801fc055b9a46e885
Please reload this pagehttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8
https://github.com/takluyver
takluyverhttps://github.com/ipython/ipython/commits?author=takluyver
IPython/terminal/ptshell.pyhttps://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8#diff-cf99f152c2bc0ac3b7b35a837578b38fad4558c7041126b12d41527484df1d40
View file https://github.com/takluyver/ipython/blob/e778cbacc703f6204637c45748340a5ce093e7f8/IPython/terminal/ptshell.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ipython/ipython/pull/9118/commits/{{ revealButtonHref }}
https://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8#diff-cf99f152c2bc0ac3b7b35a837578b38fad4558c7041126b12d41527484df1d40
https://github.com/ipython/ipython/pull/9118/commits/e778cbacc703f6204637c45748340a5ce093e7f8#diff-cf99f152c2bc0ac3b7b35a837578b38fad4558c7041126b12d41527484df1d40
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.