This commit is contained in:
Davte 2020-04-12 11:39:30 +02:00
parent 4fc9ebc38a
commit bf57baad45
2 changed files with 2 additions and 9 deletions

View File

@ -494,7 +494,7 @@ def main():
"`config.py`?\n\n" + '\n'.join(
'\t\t'.join(map(str, item))
for item in new_settings.items()
),
) + '\n\t\t\t',
timeout=3
)
if answer:

View File

@ -25,12 +25,5 @@ def timed_input(message: str = None,
print() # Print end of line
logging.info("Timeout!")
signal.alarm(0)
if given_input:
logging.info(f"You typed: {given_input}")
return
return given_input
if __name__ == '__main__':
root_logger = logging.getLogger()
root_logger.setLevel(logging.INFO)
timed_input("Inserisci qualcosa (entro 3 secondi)\t\t", timeout=3)