基础的输入,带密码掩码功能 :param prompt: 提示信息 :param is_password: 是否是密码输入 :return: 输入的数据
(self, prompt, is_password)
| 19 | |
| 20 | class SmartInput(object): |
| 21 | def __base_input(self, prompt, is_password): |
| 22 | """ |
| 23 | 基础的输入,带密码掩码功能 |
| 24 | :param prompt: 提示信息 |
| 25 | :param is_password: 是否是密码输入 |
| 26 | :return: 输入的数据 |
| 27 | """ |
| 28 | if is_password: |
| 29 | input_data = getpass.getpass(prompt) |
| 30 | else: |
| 31 | input_data = input(prompt) |
| 32 | return input_data |
| 33 | |
| 34 | def __error_retry_input(self, input_data, check_func, retry_prompt, retry_times, is_password=False): |
| 35 | """ |
no outgoing calls
no test coverage detected