Add conformance checking example
This commit is contained in:
parent
b69efc9af0
commit
17bff66e8e
8 changed files with 227 additions and 16 deletions
17
util/prompt.py
Normal file
17
util/prompt.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import sys
|
||||
|
||||
def yes_no(msg: str):
|
||||
sys.stdout.write(f"{msg} <Y/n>")
|
||||
|
||||
choice = input()
|
||||
if choice in {'Y','y',''}:
|
||||
return True
|
||||
elif choice in {'N','n'}:
|
||||
return False
|
||||
else:
|
||||
print("Please respond with 'y' or 'n'")
|
||||
return yes_no(msg)
|
||||
|
||||
def pause():
|
||||
print("press any key...")
|
||||
input()
|
||||
Loading…
Add table
Add a link
Reference in a new issue