Python Forum
[PySimpleGUI] Tutorial - Name, Address, Phone GUI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PySimpleGUI] Tutorial - Name, Address, Phone GUI
#16
(Aug-05-2018, 06:08 AM)buran Wrote: I didn't go into details/specifics of your project, but maybe you can briefly compare it (e.g. how it is different/better) with other similar projects

easygui
easygui_qt
simplegui

There are also others, that look not actively developed and maintained

I tried these and more in my quest for a GUI for my Python application. I looked for ANY package that allowed customized forms. Even bad looking forms would do as long as I could include the mix of fields and buttons I wanted. Seeing none that fit my needs, I determined it would be quicker to develop a framework and use that than it would be to code directly to tkinter.

I'm having a difficult time posting the table I made in text format so I'm posting an image of it for now. Will convert into ascii.

[Image: 43689943-a0389a1c-98cf-11e8-8cce-c80f3d8c4b04.jpg]

The biggest differences are:
  • The others are no longer maintained
  • PySimpleGUI includes the features of the others (msgbox, etc) plus the ability to create custom forms easily
  • The look and feel is limited to fonts in the others. PySimpleGUI includes fonts and colors
  • 10 of the major GUI Widget types are in PySimpleGUI. The others have 4 widgets that are used in fixed form definitions

I would also say that the compactness and Python-friendly syntax of PySimpleGUI is superior. It was built to be "in the spirit" of Python development. The others don't have that feeling, to me personally. I think it's a fantastic design that could be a basis for starting a discussion about another GUI interface for Python programmers, particularly beginners. Something needs to be done, at a language level.

If anyone is aware of other Python GUI frameworks that DO allow for custom forms, by all means let me know. I mean something besides the large-scale GUI libraries like Qt and WxPython. Ideally a few lines of code would be all that's required to create a custom GUI.

I was able to recreate EasyGUI's codebox call using a single line of PySimpleGUI code. I don't normally suggest using 1-line solutions, I'm just saying it's possible.

import PySimpleGUI as sg
import easygui   as eg

def codebox(msg, title, text):
    return sg.FlexForm(title).LayoutAndRead([[sg.Multiline(size=(60,4), default_text=msg)],[ sg.Multiline(size=(60,14), default_text=text)], [sg.OK(), sg.Cancel()]])

eg.codebox('msg', 'title', 'test')
codebox('msg', 'title', 'test')
That produced these 2 GUI windows. The first from easyGUI, the second from PySimpleGUI's simulation.
[Image: 43690889-3e2ea6c0-98e0-11e8-866f-efef3aea470f.jpg]

[Image: 43690888-3e04424a-98e0-11e8-8bc9-e21064e8b906.jpg]
Reply


Messages In This Thread
RE: [PySimpleGUI] Tutorial - Name, Address, Phone GUI - by PySimpleGUI - Aug-05-2018, 10:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PySimpleGUI Try Except jamesaarr 1 2,029 Nov-18-2021, 02:02 PM
Last Post: jamesaarr

Forum Jump:

User Panel Messages

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