Existe alguma maneira curta de conseguir o que a interface da linha de comando do APT ( Advanced Package Tool ) faz no Python?
Quero dizer, quando o gerenciador de pacotes solicita uma pergunta de sim / não seguida por [Yes/no]
, o script aceita YES/Y/yes/y
ou Enter(o padrão Yes
é sugerido pela letra maiúscula).
A única coisa que encontro nos documentos oficiais é input
e raw_input
...
Eu sei que não é tão difícil de emular, mas é irritante reescrever: |
raw_input()
é chamadoinput()
.