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
#11
Yea, you're right.... time to start working in branches. Thanks for prodding me.
Reply
#12
I wonder, are there still people who use tkinter?
In Linux I only use Qt or gtk in python.
Reply
#13
Version 2.9 released yesterday.

Has multi-column support, more color options. Now just about any layout using the standard widgets is possible. Previously was limited by lack of a Column Element due to the way the "auto-packer" works.

Also working in a dev branch now :-)

You'll find the latest docs here:
Docs

And a cookbook here to get a quick-start:
Cookbook
Reply
#14
While creating more recipes for the Cookbook, I realized that my calls and the layout can be compacted down to a single line of Python code:

import PySimpleGUI as sg

button, (filename,) = sg.FlexForm('Get filename example'). LayoutAndRead([[sg.Text('Filename')], [sg.Input(), sg.FileBrowse()], [sg.OK(), sg.Cancel()] ])
I understand that single-line solutions aren't always the best Python solution. The point is the SDK works in a Python-like manner as much as possible. That line of Python code is still somewhat readable as compared to many single-line calls.


I don't mean to sound arrogant, but how does one go about making a pitch to the Python-powers-that-be? Is there a process documented for presenting new Python ideas? If not my design, then Python needs something else that's similar.

It's crazy that with this design one line of Python code replaces many pages of typical GUI code and is superior to the other simplified packages in the flexibility. And yet, Python's only GUI promise is that tkinter is available. Why can't Python have something for the beginners that is officially supported? Why can't Python seem to get off the command line and onto the screen?
Reply
#15
(Aug-17-2018, 04:16 PM)PySimpleGUI Wrote: I understand that single-line solutions aren't always the best Python solution.
Any python code can be turned into a one liner. Some guys have written automated tools for this, such as onelinerizer. I don't think using one line code is the best way to promote your work. There are certainly more useful features to insist on...
Reply
#16
(Aug-17-2018, 04:16 PM)PySimpleGUI Wrote: It's crazy that with this design one line of Python code replaces many pages of typical GUI code and is superior to the other simplified packages in the flexibility. And yet, Python's only GUI promise is that tkinter is available. Why can't Python have something for the beginners that is officially supported? Why can't Python seem to get off the command line and onto the screen?
tkinter is "technically" the official GUI for python (for now). However only windows users assume that tkinter comes with python. In some distros of linux you have to install it like any other 3rd party package. At that point they might just install wxpython or pyqt, etc.

tkinter is for beginners of GUI. It automates some of the work for you that other GUI libs dont do. Its missing a lot of features other GUI's have for common tasks.

Guido van Rossum, the creator of Python, says of wxPython Wrote:wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first.


Quote:how does one go about making a pitch to the Python-powers-that-be? Is there a process documented for presenting new Python ideas? If not my design, then Python needs something else that's similar.
Your library is more of a wrapper around tkinter. It might just be how you want it. But what does others want? Maybe they just want to use straight tkinter because its well documented, and any question regarding an issue has a ton of Google hits. Your lib does appear to simplify tasks. If people like it then it will get popular by natural methods. This forum is not ran by those developing python or python.org site. It took me a couple years of emailing them to get this forum listed on python.org. I couldnt imagine the time it would take for something more complex than a link on the page.
Recommended Tutorials:
Reply
#17
(Aug-17-2018, 04:59 PM)Gribouillis Wrote: [quote="PySimpleGUI" pid="55583" dateline="1534522617"]I understand that single-line solutions aren't always the best Python solution.
Any python code can be turned into a one liner.
[/quote]

Perhaps should have said, one line of human readable Python code.

Point is that it's simple enough to use that you can do something custom in a single line should you want to. It reads quite well.

(Aug-17-2018, 05:53 PM)metulburr Wrote: [quote="PySimpleGUI" pid="55583" dateline="1534522617"] Your library is more of a wrapper around tkinter. It might just be how you want it. But what does others want? Maybe they just want to use straight tkinter because its well documented, and any question regarding an issue has a ton of Google hits. Your lib does appear to simplify tasks. If people like it then it will get popular by natural methods. This forum is not ran by those developing python or python.org site. It took me a couple years of emailing them to get this forum listed on python.org. I couldnt imagine the time it would take for something more complex than a link on the page.

Hey thanks for the info!

I assumed this forum was connected to the Python Foundation directly. Didn't do my homework, clearly.

I appreciate hearing your story :-) Helps set expectations.

Totally understand the need for patience with these things. Let it catch fire, etc. Given the landscape of other wrappers and simplified GUIs, I've not seen anything this easy and this powerful, especially for beginners. You need a year of Python to get into tkinter. You need a day for PySimpleGUI. I dunno, there are a lot of lazy programmers out there. The beauty of Python is the richness of the packages. What USED to take pages of code, takes lines of code now. Why write your own linear algebra routines in Python?
Reply
#18
(Aug-17-2018, 05:53 PM)PySimpleGUI Wrote: You need a year of Python to get into tkinter.
A year is quite excessive, even for absolute beginners. I would say 1-3 months depending on how often they actually spend learning. I have seen a person learn python from scratch, then learn pygame, then recreate level 1 of Mario Brothers all within 3 months. But he would sleep, eat, and breathe python/pygame that whole time.

(Aug-17-2018, 05:53 PM)PySimpleGUI Wrote: I assumed this forum was connected to the Python Foundation directly. Didn't do my homework, clearly.
I think i will put up a new page in help/rules doc explaining this. You are not the first one.

EDIT: Done.
https://python-forum.io/misc.php?action=help&hid=48
Recommended Tutorials:
Reply
#19
(Aug-17-2018, 06:35 PM)metulburr Wrote: I would say 1-3 months depending on how often they actually spend learning.

I'm taking this bet.... here's a 9 month course that doesn't even make it to tkinter.
https://canvas.uw.edu/courses/1026775/pa...e-syllabus

The university courses have similar course outlines.

If you've never programmed before, there is little hope in teaching what a "callback function" is when the concept for "function" may not have been understood yet.

I'm talking about real beginners, not the super-human kind. Not the kind that stays in their bedroom programming night and day. Not the one-off, one in a million whiz-kid programmers. I mean, Billy, the kid down the street.

Why not use a simple interface to get the exact same outcome? I mean exact same outcome too.... as in pixel for pixel. Personally, I'm a results oriented programmer. A functional GUI built with a simple framework is better than a perfect looking GUI that never gets complete.
Reply
#20
(Aug-17-2018, 08:30 PM)PySimpleGUI Wrote: I'm taking this bet.... here's a 9 month course that doesn't even make it to tkinter.
https://canvas.uw.edu/courses/1026775/pa...e-syllabus

The university courses have similar course outlines.

It depends on how much a person devotes to learning python that determines they take 3 months or a year. Just because a course lays out a time-line does not mean that is how long it takes to grasp the content. Some people can fly through that 9 month course in 3 months, some people might take 2 years (or other words have to take it twice or more). You said it takes a year of understanding python to learn tkinter (yours one day), and that is just not accurate. No one can say how long a person would take to learn something because its a variable that changes for each person.

Quote:You need a year of Python to get into tkinter. You need a day for PySimpleGUI
Quote:If you've never programmed before, there is little hope in teaching what a "callback function" is when the concept for "function" may not have been understood yet.
I am not saying 3 months for python and tkinter. I am saying 3 months for python fundamentals that would be required to start tkinter. Learning GUI is a whole different ball game from learning the basics.

Maybe you shouldnt advertise with your library specific time-lines to noobies. If they have a hard time learning the material in 1-3 months, they would be disappointed while if they hear it takes 1 year it can be daunting. It can take either or based on their effort and time put into learning.
Recommended Tutorials:
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