import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()
def print_input_text():
print(dpg.get_value("__input_text"))
with dpg.window() as win1:
dpg.add_input_text(tag="__input_text")
dpg.add_button(label="Button",callback=print_input_text)
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()