pysimplegui

Connect/Process a script to PySimpleGUI button

ぐ巨炮叔叔 提交于 2021-02-18 18:55:23
问题 can you guys help me to know how to connect a button in my PySimpleGui script which will execute another python script when the run button is pressed/clicked. For now, i've been reading about Subprocess and command = os.popen in a GUI script. layout = [[ sg.Text('Click the button to launch Program')], [sg.Button('Launch')]] win1 = sg.Window('My new window').Layout(layout) win2_activate = False while True: ev1, vals1 = win1.Read() if ev1 is None or ev1 == 'Cancel': break if not win2_activate

Connect/Process a script to PySimpleGUI button

♀尐吖头ヾ 提交于 2021-02-18 18:54:55
问题 can you guys help me to know how to connect a button in my PySimpleGui script which will execute another python script when the run button is pressed/clicked. For now, i've been reading about Subprocess and command = os.popen in a GUI script. layout = [[ sg.Text('Click the button to launch Program')], [sg.Button('Launch')]] win1 = sg.Window('My new window').Layout(layout) win2_activate = False while True: ev1, vals1 = win1.Read() if ev1 is None or ev1 == 'Cancel': break if not win2_activate

MacOS app built with py2app package could never open

吃可爱长大的小学妹 提交于 2021-02-11 16:44:43
问题 I wanna have the app run properly, could anybody help? Source Code is here, below: it ran properly in Pycharm Community Edition.And it looks like this: and the py2app went well too: howerver, when build is done, i could never open the app. the setup file is like: 来源: https://stackoverflow.com/questions/60157319/macos-app-built-with-py2app-package-could-never-open

MacOS app built with py2app package could never open

柔情痞子 提交于 2021-02-11 16:44:22
问题 I wanna have the app run properly, could anybody help? Source Code is here, below: it ran properly in Pycharm Community Edition.And it looks like this: and the py2app went well too: howerver, when build is done, i could never open the app. the setup file is like: 来源: https://stackoverflow.com/questions/60157319/macos-app-built-with-py2app-package-could-never-open

Where to put large Python lists

冷暖自知 提交于 2021-02-11 15:57:38
问题 I'm writing a python program that uses a list of all of the words in an English dictionary, so we're talking a few megabytes. I would like a clean way of including the list as a constant without it getting in the way of the source code. I would put it in a JSON file or something, but I'm using PySimpleGUI, and I want to take advantage of its ability to turn the code into a Windows EXE file, and I doubt it could do that with an external text file. So, in order of preference I would like to do

PySimpleGui: How to enter text in the text box?

孤人 提交于 2021-01-28 23:21:27
问题 I am learning PySimpleGui by referring the tutorials at Link-1 and Link-2 I need to add buttons to my layout to enter a value, then display the value in adjoining textbox So far, i have been able to create the buttons and the textboxes. Following is my code:- import PySimpleGUI as sg layout = [[sg.Text('Enter Value:')], [sg.Input(do_not_clear=False), sg.Text('Value selected is:'), sg.Text(sg.InputText(""), key='_USERNAME_')], [sg.Button('Enter'), sg.Exit()], [sg.Text('List Of Values:')], [sg

PySimpleGui: How to enter text in the text box?

纵饮孤独 提交于 2021-01-28 22:22:23
问题 I am learning PySimpleGui by referring the tutorials at Link-1 and Link-2 I need to add buttons to my layout to enter a value, then display the value in adjoining textbox So far, i have been able to create the buttons and the textboxes. Following is my code:- import PySimpleGUI as sg layout = [[sg.Text('Enter Value:')], [sg.Input(do_not_clear=False), sg.Text('Value selected is:'), sg.Text(sg.InputText(""), key='_USERNAME_')], [sg.Button('Enter'), sg.Exit()], [sg.Text('List Of Values:')], [sg

PySimpleGui: How to enter text in the text box?

我们两清 提交于 2021-01-28 22:06:52
问题 I am learning PySimpleGui by referring the tutorials at Link-1 and Link-2 I need to add buttons to my layout to enter a value, then display the value in adjoining textbox So far, i have been able to create the buttons and the textboxes. Following is my code:- import PySimpleGUI as sg layout = [[sg.Text('Enter Value:')], [sg.Input(do_not_clear=False), sg.Text('Value selected is:'), sg.Text(sg.InputText(""), key='_USERNAME_')], [sg.Button('Enter'), sg.Exit()], [sg.Text('List Of Values:')], [sg