Author Topic: PySimpleGUI  (Read 12904 times)

PySimpleGUI

  • Guest
Re: PySimpleGUI
« Reply #30 on: September 04, 2018, 08:01:38 PM »
I am thinking there are enough Py forums already and wondering if PySimpleGUI is really BestOf... with another one of his name changes.  ;)

No, then it would be "easyaspygui"

Had EasyGUI had enough feature for my project, PySimpleGUI wouldn't exist.  I took a look at all of the GUI options I could and determined there was a gap.  I couldn't find anything that would allow you to create pretty much any GUI you can draw on a piece of paper.

So, yea, it's the best of, but then some.

The way you interface with PySimpleGUI was built from the ground up, not borrowed from anything that I saw.  I came at the problem from a pure Python outlook. What's the Pythonic way of representing data, getting return values?  I tried to keep Python in the forefront of the design.

I'm not knocking the prior work people did.  A lot of people spent a lot of time creating software that they gave away.  It's really hard to knock those kinds of efforts and not look like a dick.



PySimpleGUI

  • Guest
Re: PySimpleGUI
« Reply #31 on: September 04, 2018, 08:29:43 PM »

Funny thing is, I am using youtube-dl on my RPi and using a GUI for entering the URL of the video. But I am not using Python but a bash script with Zenity.  ;)

I have not heard of Zenity before. 
I really like their interface.

I just went through a renaming exercise for all of my "Message Boxes".  The names Zenity used are great!

Code: [Select]
A Zenity infobox as displayed on GNOME 3 (Please press a button).png
from PyZenity import InfoMessage
from PyZenity import Question
from PyZenity import ErrorMessage

choice=Question('Please press a button.')

if choice:
     InfoMessage('You pressed Yes!')
else:
     ErrorMessage('You pressed No!')


I'm liking the Question name in particular. 

One target group for PySimpleGUI are beginners that don't know computer stuff at all.  My previous function name for Popup was MsgBox.  MsgBox is easy to get for programmer types, but it's not obvious to non-programmers.  I think almost everyone that's used the internet can tell you what a Popup is.

I've clearly got something to learn from these folks.

If you like putting GUIs onto the front end of your programs, think about using PySimpleGUI for your next one.  You can copy the demo program for launching scripts and get a headstart.   Just shout if you want to give it a try and I'll give you a hand.

Aurel

  • Guest
Re: PySimpleGUI
« Reply #32 on: September 05, 2018, 07:14:09 AM »
PopUp
?
It is a MessageBox which is type of dialog window in winApi GUI programming.
PopUp is a type of window.
Well i never tried when i used python to load mydll.dll import in app
let say dll created with Oxygen basic or Free basic  or C
is that possible...
If is then you can create GUI functions in this compilers and add it to python program?

Tomaaz

  • Guest
Re: PySimpleGUI
« Reply #33 on: September 05, 2018, 05:42:40 PM »
I am thinking there are enough Py forums already and wondering if PySimpleGUI is really BestOf... with another one of his name changes.  ;)

No, then it would be "easyaspygui"

You should try to use Easygui, PySimpleGUI and Tkinter directly. You will clearly see that they are quite different. Also, Easygui's been abandoned.
« Last Edit: September 05, 2018, 05:44:45 PM by Tomaaz »

PySimpleGUI

  • Guest
Re: PySimpleGUI
« Reply #34 on: September 06, 2018, 07:57:13 PM »
I've been dumping in features on a daily basis.

Just released version 2.30 to PyPI.

It includes borderless windows (i.e. have no titlebar). They're pretty slick looking.  Really clean looking interfaces are possible now.



Here's another program that I run a LOT.  It queries Stack Overflow using a program called How Do I.  If you ever visit stack overflow, this it the program for you!



I've been doing quite a bit with the docs too. Making lots of Recipes for the Cookbook and have 46 demo programs that can be downloaded.

Maybe the password login one is of interest?  It was fun because it contains a GUI to create your SHA1 hash code that you paste into your code for comparison.  The code you drop into the program that you want the password entry on is relatively small at about 15 total lines of code.

https://github.com/MikeTheWatchGuy/PySimpleGUI/blob/master/Demo_Password_Login.py

Trying to try prototype as many different kinds of scenarios as possible.  It ends up pushing the feature set.  Recently added a Calendar chooser that looks really nice.

Part of why I'm out talking to people that at least have a chance of trying it out is to find the kinds of problems they want to solve.  Sometimes that leads to new stuff.

Do any of you have kids that are into programming?

One goal is to get kids thinking about computers using modern interfaces rather than the command line.  Not knocking command line for people that like it or need to use pipes.  Those aren't my peeps.  It's the person that's interested in getting something working that looks good that I'm interested in reaching.  Why not teach them that you can get input from a window and output to one just as easily as you can the command line?


Aurel

  • Guest
Re: PySimpleGUI
« Reply #35 on: September 06, 2018, 09:36:14 PM »
Quote
Why not teach them that you can get input from a window and output to one just as easily as you can the command line

Well this can be done in many BASIC dialect which support GUI programming
and most of them do that very well ...but i think that you know that ..right?
Did you ever made programs in any BASIC dialect or you use python only?
I just asking..

PySimpleGUI

  • Guest
Re: PySimpleGUI
« Reply #36 on: September 07, 2018, 12:51:07 AM »
Well this can be done in many BASIC dialect which support GUI programming
and most of them do that very well ...but i think that you know that ..right?
Did you ever made programs in any BASIC dialect or you use python only?
I just asking..

I haven't programmed using a modern BASIC dialect.  The last time I programmed in basic was 1979.  Just sayin.  ;)

Sounds like there are things Python can learn from BASIC.  Or I can.

GUIs shouldn't be hard.  Beginners should be able to write their own software that they use if they want.  Maybe you've written a file copy utility as an exercise and want to use it as part of your daily routing use on a computer.  Could be just me that liked that kind of stuff when I was learning. 

Are there particular features you use from YouTube-dl?  I got it to grab subtitles so that's all my GUI does at the moment, build and present a list of subtitles that can be downloaded.




Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: PySimpleGUI
« Reply #37 on: September 07, 2018, 03:47:59 PM »

Are there particular features you use from YouTube-dl?  I got it to grab subtitles so that's all my GUI does at the moment, build and present a list of subtitles that can be downloaded.

Just for watching youtube videos on my Raspberry Pi. I enter the URL of the video and then it is played via the omxplayer which has a better performance than using any webbrowser.
Hm, I really should have a deeper look into Python I guess ... it's the preferred programming language for the RPi. (Although I am a big fan of Lua)
According to your post, that you programmed the last time in BASIC in 1979, you are also not the youngest I guess.  ;) I started in 1984 programming in BASIC with the Commodore 64.

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: PySimpleGUI
« Reply #38 on: September 08, 2018, 09:32:52 PM »
The script is nothing more than this:

Code: [Select]
inputStr=$(zenity --entry --title="Play Youtube video" --text="Enter URL")
omxplayer -o local `youtube-dl -g -f best $inputStr`

PySimpleGUI

  • Guest
Re: PySimpleGUI
« Reply #39 on: September 11, 2018, 02:58:13 AM »
The script is nothing more than this:

Code: [Select]
inputStr=$(zenity --entry --title="Play Youtube video" --text="Enter URL")
omxplayer -o local `youtube-dl -g -f best $inputStr`

Yea, but it can sometimes take weeks to find the exact string you needed to get whatever it is done you wanted.  The mighty string!

PySimpleGUI

  • Guest
Re: PySimpleGUI
« Reply #40 on: September 17, 2018, 06:03:12 PM »
I created a retro-game using PySimpleGUI.   PONG

I'm slowly working my way toward being appealing to the youthful beginner.  Often games are a desired project.

Pong using PySimpleGUI

I didn't write the pong code, but I did integrate it into a GUI so buttons, etc can be added.

A number of people have posted in the past complaining that there is no GUI in PyGame.  I would like to integrate with PyGame too so that a GUI solutions exists for those people wanting one.


PySimpleGUI

  • Guest
Re: PySimpleGUI
« Reply #41 on: September 21, 2018, 04:14:30 AM »