Python Forum
[PySimpleGUI] New GUI Package. Customize with ease
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PySimpleGUI] New GUI Package. Customize with ease
#21
My goal is to put GUIs into the hands of beginners in their first week of coding.

I don't see why they can't copy, paste and modify 4 lines of code in order to get a GUI onto the front end of their 10 line high-low game. 99.999% of the people that use computers interact with them through a windows interface of some kind. A large % of don't use a command line program on a daily basis. I don't see why a beginner needs to be in the world of command line interaction with a company any longer than 1 week.

It's not just for beginners. I have seen more experienced programmers using this code to slap a front-end onto their utilities like a PDF watermarking utility. They can clearly write their own GUIs, but preferred instead to write 5 or 6 lines of code using PySimpleGUI.
Reply
#22
(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.
Reply
#23
(Aug-19-2018, 03:27 PM)Axel_Erfurt Wrote:
(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.
Exactly!

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)
Reply
#24
(Aug-17-2018, 10:45 PM)PySimpleGUI Wrote: 99.999% of the people that use computers interact with them through a windows interface of some kind. A large % of don't use a command line program on a daily basis. I don't see why a beginner needs to be in the world of command line interaction with a company any longer than 1 week.
Tell that to the linux community and you will get an ear full. Linux is the majority of servers for the web, and a lot of communication to that is via terminal daily, not GUI. Not everyone uses Filezilla or similar, but SSH/SCP. And there are a lot of distros of linux that do not come with a windows manager. You just start out with a prompt and have to install everything if you even want a window manager. Arch Linux is one that i have done.

Yes most people use GUI. But it is not %99.999 of everyone that uses computers.

A beginner should learn to use the terminal/command prompt because then they see what is going on under the hood. Especially if they are programming should know this stuff. Its pretty sad when someone knows how to code well, but cannot figure out what the "run" button actually does or what is going on when you double click a program's icon.

Also GUI programs are notoriously slow and laggy. The terminal is fluent and fast.
Recommended Tutorials:
Reply
#25
Just so I understand, you interact with computers by booting straight to a command prompt, never to run a Linux or other desktop? Furthermore, you interact with the internet by reading raw HTML when you visit a web site?

Wow, you're wired differently than most, huh? Clearly not the GUI for you (or any GUI it would seem).

There are always better ways of doing things with computers, but I've got a more forward looking outlook than most.

(loving the negative reputation.... such a receptive audience!)
Reply
#26
(Aug-20-2018, 07:01 PM)PySimpleGUI Wrote: (loving the negative reputation.... such a receptive audience!)

Considering you've gotten to the point of misrepresenting other people's positions and giving them backhanded insults, you shouldn't be surprised. Tone it down.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#27
(Aug-20-2018, 07:01 PM)PySimpleGUI Wrote: you interact with computers by booting straight to a command prompt
yes. In fact that is the sole purpose why Arch linux does not include a windows manager...because some people dont want one.
Recommended Tutorials:
Reply
#28
And to get my two cents in. Tkinter one of the minimalist GUI's available, why yet another wrapper around a mediocre package?
Reply
#29
(Aug-20-2018, 09:30 PM)Larz60+ Wrote: And to get my two cents in. Tkinter one of the minimalist GUI's available, why yet another wrapper around a mediocre package?

Now that's an interesting question...

The answer is two-fold
1. Tkinter is in the majority of Python distributions
2. If you look at the Issues in the GitHub, you'll find an enhancement for the future to support Qt, etc.

Wanted to start with a single file, no dependencies solution first.
Reply
#30
(Aug-20-2018, 09:30 PM)Larz60+ Wrote: why yet another wrapper around a mediocre package?

I don't think tkinter is a mediocre package. Tkinter is the python wrapper around tcl/tk, which is an award winning software by a great computer scientist and programmer.

The point is that it's a 30 years old GUI system and our standards have changed in these matters. We now live in the luxury of fast processors, huge RAM and great graphic cards, so tkinter looks a little bit outdated.

Another aspect, from the python programmer's point of vue is that tk is not at all pythonic, which makes tkinter programming look unnatural in the python world.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PySimpleGUI]Install package on Conda not up-to-date RayJohnson 4 4,384 Jan-22-2020, 11:17 PM
Last Post: RayJohnson

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020