python library for user input

前端 未结 5 1665
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-05 17:37

I am implementing a small command line tool in python that needs to ask the user a couple of questions. I use

raw_input(\'Are you male or female?\')
<         


        
5条回答
  •  孤城傲影
    2021-01-05 18:10

    Necromanting again...

    Please have a look at click if you need a simple helper library for questions. Its main focus are command line options, but it’s a good fit for your use case, I think.

提交回复
热议问题