From c45d1b542f064f4d0da312642e3364c9f1e2dbeb Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Fri, 24 Dec 2021 15:09:43 +0100 Subject: prompt_command + get_allocable_address --- tonkadur_ui.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tonkadur_ui.py') diff --git a/tonkadur_ui.py b/tonkadur_ui.py index 6fb5b5b..5962b6d 100644 --- a/tonkadur_ui.py +++ b/tonkadur_ui.py @@ -87,6 +87,26 @@ try: print("Input size not within range.") state.store_string(user_input) + elif (result_category == "prompt_command"): + while True: + user_input = input( + display_text(result['label']) + + " " + + "[" + + str(result['min']) + + ", " + + str(result['max']) + + "] " + ) + if ( + (len(user_input) >= result['min']) + and (len(user_input) <= result['max']) + ): + break + else: + print("Input size not within range.") + state.store_command(user_input.split(' ')) + elif (result_category == "assert"): print( "Assert failed at line " -- cgit v1.2.3-70-g09d2