Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUI
#1
As a beginner at Python, I am very pleased and surprised to find that I can actually make it do something which is useful and time-saving for me.

I have written a routine to resize photos, another to put the photos in an excel table next to the name, another to find empty entries in a .csv file and record the student number.

These all work in a terminal in seconds. I'm amazed! I never thought it would work!

Now I would like to know how to make a Graphical User Interface, a nice little window instead of a dull terminal.

Can Python do that? What do I need to read? I would be grateful for any links or tips.
Reply
#2
I like using tkinter for GUI programming. Here are two sites that I find pretty helpful: 
https://www.tutorialspoint.com/python/py...amming.htm
http://effbot.org/tkinterbook/

And one last thing- if you're using python 3, the code is import tkinter, not import Tkinter, which is for Python 2. Everything else is mostly the same, which is nice because some of the tutorials are for python 2.
Reply
#3
Tkinter is ok if you're doing relatively small GUI programs.
If you want something more robust, there's wxpython, Qt and Kivy
to mention a few.
Reply
#4
Thanks both of you.

I'm a Ubuntu user. I think Ubuntu uses Qt a lot, I see it mentioned a lot in updates. I will try tkinter first. I am only doing small things.

If I want to try Qt, what do I need to import?
Reply
#5
all new versions of python have  tkinter included.
you can easily find out if you have it
just start an interactive version of python and:
try:
    import tkinter
except:
    import Tkinter
if you get no error, it's loaded
Reply
#6
I am a beginner as well. How import is installing a GUI to unlocking the full utility of Python? Is it important at all or just for visual purposes?
Reply
#7
Python will accommodate any GUI package that has an interface to python.
tkinter which is a wrapper around tk (and ttk with extension). It is easy to use
except for it's geometry. wxpython's new phoenix version's geometry is easy to
use and robust, allowing easy to use geometry with capability for drag and drop
among other things.

You have control over all parts of a widget, including color  of borders, etc. It is
in my opinion very easy to use.  The older version will run with old python. Phoenix
requires python 3.

I strongly believe that all developers should be using the latest version of python, currently
3.6.2.

Qt5 is an excellent package, and has the community version, but with their high priced commercial
version, I personally feel that the community edition may start to fade, though I know of no plan
to do this.
Reply


Forum Jump:

User Panel Messages

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