PySimpleGUI版本的Pseudo Meaning Generator for Englsh words(英语单词伪意义的生成器)

Odele ·
更新时间:2024-11-14
· 682 次阅读

可以输入2-6位的词根来查询他们在固定范式下的伪意义:

import PySimpleGUI as sg import get_pseudo_meanning as gpm switch = True while switch: layout = [ [sg.Text('Please enter an English word you want to look up to and memorize\n with associative picture (within 2-6 letters):')], [sg.InputText(),sg.Submit('Lookup')] ] input_window = sg.FlexForm('Pseudo Meaning Generator for English Words',layout) event,value = input_window.Read() text_input = value[0] pseudo_meaning_of_input = gpm.get_pseudo_meanning(text_input) # message = pseudo_meaning_of_input input_window.Close() output_windows = sg.FlexForm('Pseudo Meaning Generator for English Words') output_layout = [ [sg.Text(pseudo_meaning_of_input)], [sg.OK('Continue'),sg.Cancel('Exit')] ] button, values = output_windows.Layout(output_layout).Read() if button == 'Cancel': switch = False output_windows.Close()

运行结果如下:
在这里插入图片描述
点击lookup按钮之后,得到查询结果:
在这里插入图片描述


作者:梧桐雪



words 英语单词 for 生成器 英语 单词

需要 登录 后方可回复, 如果你还没有账号请 注册新账号