[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-689116-105":59,"doc-detail-689116-en":130,"doc-similar-689116":234},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","prompt_toolkit-getting-started-build-powerful-interactive-command-line-apps","prompt_toolkit - Getting Started - Build Powerful Interactive Command Line Apps","","prompt_toolkit is a Python library for creating powerful interactive command line and terminal applications, functioning as an advanced pure-Python alternative to GNU readline and also supporting full screen interfaces. It provides syntax highlighting while typing, multi-line editing, advanced code completion, and text selection for copy/paste with Emacs and Vi styles. Additional capabilities include mouse support, auto suggestions inspired by fish shell, incremental search, Unicode double-width character handling, and lightweight operation with only Pygments and wcwidth dependencies across multiple operating systems.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/prompt_toolkit-getting-started-build-powerful-interactive-command-line-apps/689116/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/prompt_toolkit-getting-started-build-powerful-interactive-command-line-apps/689116.png","ImageObject",300,407,{"name":92,"@type":93},"（）","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-21","2026-11-08",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is prompt_toolkit used for?","Question",{"text":112,"@type":113},"prompt_toolkit is used to build interactive command line and terminal applications in Python, including full screen applications.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What key features does prompt_toolkit provide?",{"text":117,"@type":113},"It supports syntax highlighting, multi-line editing, advanced code completion, selectable copy/paste with Emacs/Vi styles, mouse support, auto suggestions, and incremental search.",{"name":119,"@type":110,"acceptedAnswer":120},"What systems and dependencies does prompt_toolkit support?",{"text":121,"@type":113},"It runs on Linux, OS X, OpenBSD, and Windows, using pure Python with dependencies limited to Pygments and wcwidth, and it can be used with various Python versions starting at Python 3.6.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},689116,1794096793,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":46,"preview_urls":145},5909898202386,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","prompt 􀁴􀁯􀁯􀁬􀁫􀁩􀁴􀁄􀁯􀁣􀁵􀁭􀁥􀁮􀁴􀁡􀁴􀁩􀁯􀁮  \nRelease 3.0.52  \nJonathan Slenders  \nAug 28, 2025  \nCONTENTS  \n1 Getting started 3  \n2 Thanks to: 5  \n3 Table of contents 7  \n3.1 Gallery .................................................. 7  \n3.2 Getting started .............................................. 10  \n3.3 Upgrading ................................................ 11  \n3.4 Printing (and using) formatted text .................................... 15  \n3.5 Asking for input (prompts) ........................................ 19  \n3.6 Asking for a choice ............................................ 39  \n3.7 Dialogs .................................................. 43  \n3.8 Progress bars ............................................... 52  \n3.9 Building full screen applications ..................................... 56  \n3. 10 Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61  \n3.11 Advanced topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70  \n3. 12 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89  \n3.13 Related projects ............................................. 172  \n4 Indices and tables 173  \nPython Module Index 175  \nIndex 177  \nii  \nprompt_toolkit is a library for building powerful interactive command line and terminal applications in Python.  \nIt can be a very advanced pure Python replacement for GNU readline, but it can also be used for building full screen applications.  \nSome features:  \n• Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)  \n• Multi-line input editing.  \n• Advanced code completion.  \n• Selecting text for copy/paste. (Both Emacs and Vi style.)  \n• Mouse support for cursor positioning and scrolling.  \n• Auto suggestions. (Like fish shell.)  \n• No global state.  \nLike readline:  \n• Both Emacs and Vi key bindings.  \n• Reverse and forward incremental search.  \n• Works well with Unicode double width characters. (Chinese input.) Works everywhere:  \n• Pure Python. Runs on all Python versions starting at Python 3.6 . (Python 2.6-3.x is supported in prompt_toolkit 2.0; not 3 .0) .  \n• Runs on Linux, OS X, OpenBSD and Windows systems.  \n• Lightweight, the only dependencies are Pygments and wcwidth.  \n• No assumptions about I/O are made. Every prompt_toolkit application should also run in a telnet/ssh server or an asyncio process.  \nHave a look at the gallery to get an idea of what is possible.  \nCHAPTER  \nONE  \nGETTING STARTED  \nGo to getting started and build your first prompt. Issues are tracked on the Github project.  \nCHAPTER  \nTWO  \nTHANKS TO:  \nA special thanks to all the contributors for making prompt_toolkit possible.  \nAlso, a special thanks to the Pygments and wcwidth libraries.","cbCaihuaSrJ0uCR3","https://ap.wps.com/l/cbCaihuaSrJ0uCR3","pdf",2485535,194,"English","# Getting started\n# Thanks to\n# Table of contents\n## Gallery\n## Getting started\n## Upgrading\n## Printing (and using) formatted text\n## Asking for input (prompts)\n## Asking for a choice\n## Dialogs\n## Progress bars\n## Building full screen applications\n## Tutorials\n## Advanced topics\n## Reference\n## Related projects\n# Indices and tables","[{\"question\":\"What is prompt_toolkit used for?\",\"answer\":\"prompt_toolkit is used to build interactive command line and terminal applications in Python, including full screen applications.\"},{\"question\":\"What key features does prompt_toolkit provide?\",\"answer\":\"It supports syntax highlighting, multi-line editing, advanced code completion, selectable copy/paste with Emacs/Vi styles, mouse support, auto suggestions, and incremental search.\"},{\"question\":\"What systems and dependencies does prompt_toolkit support?\",\"answer\":\"It runs on Linux, OS X, OpenBSD, and Windows, using pure Python with dependencies limited to Pygments and wcwidth, and it can be used with various Python versions starting at Python 3.6.\"}]","prompt_toolkit - Getting Started - Build Powerful Interactive Command Line Apps | PDF",489,[146,150,154,158,162,166,170,174,178,182,186,191,196,201,206,211,216,221,226,230],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/5c1c0d33052347acd07b573ebad51088.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/ae0a851d4bbc155872d3d5674e5a6b5e.webp",982,1270,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e591118668d4b777197711553616fb22.webp",981,1269,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/b435bb546bbf0c447365ab890e179853.webp",980,1268,{"page_no":24,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/f360d657a5af4c5a43998d7458315937.webp",979,1267,{"page_no":29,"url":167,"width":168,"height":169},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/97bd1bda03acd1a31620c51f7c24df13.webp",978,1265,{"page_no":34,"url":171,"width":172,"height":173},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c35755bf3a715ca88b0d97b2b8eb706c.webp",977,1264,{"page_no":39,"url":175,"width":176,"height":177},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/4f080cb2884c4137a96e28244f7a7a8d.webp",976,1263,{"page_no":44,"url":179,"width":180,"height":181},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/dc45b03bb43a5af4114336a1cec3bdea.webp",975,1261,{"page_no":52,"url":183,"width":184,"height":185},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/60601088453549149becf6eef32f4324.webp",974,1260,{"page_no":187,"url":188,"width":189,"height":190},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/6ee5aa8fa00547e34b7272c2b35f4bc3.webp",973,1259,{"page_no":192,"url":193,"width":194,"height":195},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/6044912d34c3abee4782e7059f4d2445.webp",972,1257,{"page_no":197,"url":198,"width":199,"height":200},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/d54dfb45913a6a89e92b44a84ba5ee76.webp",971,1256,{"page_no":202,"url":203,"width":204,"height":205},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/fb810ad8694b957836e57519d627b162.webp",970,1255,{"page_no":207,"url":208,"width":209,"height":210},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/f7c4732a64bac3ccb78dc9ebe8b7fb49.webp",969,1254,{"page_no":212,"url":213,"width":214,"height":215},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/f780aa92c6e08da73f70065682401f93.webp",968,1252,{"page_no":217,"url":218,"width":219,"height":220},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c73a1359f155adbfa4c5da74691a0add.webp",967,1251,{"page_no":222,"url":223,"width":224,"height":225},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/4f6976ff4573ba001c002bbf6a3fbd72.webp",966,1250,{"page_no":56,"url":227,"width":228,"height":229},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/09f2a6e07f478f4479cdacabb16c4232.webp",965,1248,{"page_no":46,"url":231,"width":232,"height":233},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/ec232c0eb9025c00a80ecd42ff5cebec.webp",964,1247,{"list":235,"token":66},[236,242,248,254,260,266,272,278,284,290],{"doc_id":237,"doc_title":238,"file_type":137,"home_preview_img_url":239,"slug":240,"view_count":19,"category_name":30,"create_tm":241},689138,"GNU Emacs Manual - Fourteenth Edition - Updated for Emacs Version 21.3","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001520017/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=M%2FH%2FHFhtNv6pEL2N5nmDMX79%2B0s%3D","gnu-emacs-manual-fourteenth-edition-updated-for-emacs-version-213",1794097429,{"doc_id":243,"doc_title":244,"file_type":137,"home_preview_img_url":245,"slug":246,"view_count":197,"category_name":30,"create_tm":247},671807,"A Practical Guide to Linux Commands - Editors and Shell Programming - Third Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988776589/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=%2BzCBfHRIAJLCsDjPY01O7EoSnZE%3D","a-practical-guide-to-linux-commands-editors-and-shell-programming-third-edition",1793580874,{"doc_id":249,"doc_title":250,"file_type":137,"home_preview_img_url":251,"slug":252,"view_count":14,"category_name":30,"create_tm":253},732861,"Linear Algebra Google Colab Tutorial","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031413140/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=hwfnA3KPr3fary99KJWI3yqTLE0%3D","linear-algebra-google-colab-tutorial",1795382567,{"doc_id":255,"doc_title":256,"file_type":137,"home_preview_img_url":257,"slug":258,"view_count":24,"category_name":30,"create_tm":259},689145,"Let there be vim - Part 3 - editor war, modes, and keyboard power","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000681798/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=TE3p%2BgDdzhgZmNF7vEMdVFWdnYE%3D","let-there-be-vim-part-3-editor-war-modes-and-keyboard-power",1794097592,{"doc_id":261,"doc_title":262,"file_type":137,"home_preview_img_url":263,"slug":264,"view_count":19,"category_name":30,"create_tm":265},719777,"Python For Dummies - Introducing Python - Getting Started","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023659675/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=ui8WJ8K9ixhqxOLRkeqDK6WMm2A%3D","python-for-dummies-introducing-python-getting-started",1795031061,{"doc_id":267,"doc_title":268,"file_type":137,"home_preview_img_url":269,"slug":270,"view_count":19,"category_name":30,"create_tm":271},671798,"Python - Visual QuickStart Guide Table of Contents - Chapter 1 to Appendix B","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988403999/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=hPIE8oQdNvtz1Qqfh9YtuZ%2B5HiM%3D","python-visual-quickstart-guide-table-of-contents-chapter-1-to-appendix-b",1793580658,{"doc_id":273,"doc_title":274,"file_type":137,"home_preview_img_url":275,"slug":276,"view_count":44,"category_name":30,"create_tm":277},692234,"PYTHON-QUICK GUIDE - Beginner - Start Here","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003011241/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=4sArtD6m30BFhHq9ANtP1orSR0E%3D","python-quick-guide-beginner-start-here",1794186385,{"doc_id":279,"doc_title":280,"file_type":137,"home_preview_img_url":281,"slug":282,"view_count":19,"category_name":30,"create_tm":283},682217,"A Python Style Guide - Draft","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229998448576/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=3A02D8q6tS9gbhiaNw0qHITsLi0%3D","a-python-style-guide-draft",1793963006,{"doc_id":285,"doc_title":286,"file_type":137,"home_preview_img_url":287,"slug":288,"view_count":222,"category_name":30,"create_tm":289},119392,"peptidy - a light-weight Python library for peptide representation in machine learning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229835126888/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=JW1twLf2sSwJBlHBMI2z8cR8d5g%3D","peptidy-a-light-weight-python-library-for-peptide-representation-in-machine-learning",1785724068,{"doc_id":291,"doc_title":292,"file_type":137,"home_preview_img_url":293,"slug":294,"view_count":19,"category_name":30,"create_tm":295},687539,"PYTHON AND PYCHARM - Introduction to Python - Why Python? - Virtual Environment - Basic Packages Managing - Anaconda - Python IDE + Miniconda = PyCharm - New Project","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000649342/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796120459&Signature=ksXLqga%2BfyWVyy8WBakP0NpLuco%3D","python-and-pycharm-introduction-to-python-why-python-virtual-environment-basic-packages-managing-anaconda-python-ide-miniconda-pycharm-new-project",1794084032]