GUI - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: GUI (/thread-5160.html) |
GUI - Pedroski55 - Sep-21-2017 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. RE: GUI - Lux - Sep-21-2017 I like using tkinter for GUI programming. Here are two sites that I find pretty helpful: https://www.tutorialspoint.com/python/python_gui_programming.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.
RE: GUI - Larz60+ - Sep-21-2017 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. RE: GUI - Pedroski55 - Sep-21-2017 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? RE: GUI - Larz60+ - Sep-21-2017 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 Tkinterif you get no error, it's loaded RE: GUI - Athenaeum - Sep-22-2017 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? RE: GUI - Larz60+ - Sep-22-2017 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. |