justcode.ikeepstudying.com
Python: 终端交互程序,在终端中创建交互式选择列表, create curses based interactive selection list in the terminal - Just Code
pick是一个小型的python库,可帮助您在终端中创建基于curses的交互式选择列表。实际观看: 项目地址:https://github.com/wong2/pick 安装: pip install pick 如果使用了Windows,那么还要另外执行一个语句: pip install windows-curses 使用方法: pick comes with a simple api: 单选实例 from pick import pick title = 'Please choose your favorite programming language: ' options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell'] option, index = pick(options, title) print(option) print(index) outputs: 输出 …