Aug-19-2018, 03:46 PM
(This post was last modified: Aug-19-2018, 03:53 PM by PySimpleGUI.)
(Aug-19-2018, 03:27 PM)Axel_Erfurt Wrote:Exactly!(Aug-17-2018, 10:45 PM)PySimpleGUI Wrote: My goal is to put GUIs into the hands of beginners in their first week of coding.My motto is: first learn the basics. If the beginners then see a code with tkinter, they understand nothing.
Learn the basics about how a GUI can be used and works, then when they can understand more advanced, look at tkinter or some other framework. PySimpleGUI is not a detour from tkinter, it's on the way to tkinter.
Have you looked at PySimpleGUI and tried to make a sample GUI? You're making it sound like it's a lot of work to learn and use. It's a nothing investment for a GUI outcome. Not understanding at all the pushback for using it.
1,000's of people are using EasyGUI. Do you think it's a waste for people to use it too? If there wasn't a need, EasyGUI wouldn't get 100s of installs a day despite it not being maintained for a long time.
It's not just beginners using PySimpleGUI.
The folks making the PyMuPDF are using it for their utilities. One of the engineers sent me this PDF reader today. A few lines of code and you're able to preview a PDF file. Not all developers are super-strict, no outside of core-packages until the basics are all down. Some just want to get the job done. A basic GUI that's running is a lot better than a tkinter GUI that is given up on.
import sys import fitz import PySimpleGUI as sg fname = sys.argv[1] # fname = 'C:/Python/PycharmProjects/GooeyGUI/test.pdf' doc = fitz.open(fname) title = "PyMuPDF display of '%s' (%i pages)" % (fname, len(doc)) def get_page(pno): pix = doc[pno].getPixmap(alpha = False) return pix.getPNGData() form = sg.FlexForm(title) data = get_page(0) image_elem = sg.Image(data=data) layout = [ [image_elem], [sg.ReadFormButton('Next'), sg.ReadFormButton('Prev'), sg.ReadFormButton('First'), sg.ReadFormButton('Last'), sg.Quit()] ] form.Layout(layout) i = 0 while True: button,value = form.Read() if button in (None, 'Quit'): break i -= 1 * button == 'Prev' i += 1* button == 'Next' i = 0 if button =='First' else -1 if button == 'Last' else i try: data = get_page(i) except: i = 0 data = get_page(i) image_elem.Update(data=data)