How to create beautiful UI's with Python [closed]
Asked Answered
S

4

45

I wonder if it's possible to create good looking desktop UI's with python? Could I use JS frameworks like Electron with python? Or are there any python libraries which provide modern looking and easy to use widgets?

This is what I have in mind for the appearance:

Something like that.

Image Credit: https://dribbble.com/jnhffmnn

Is this possible and where can I find resources on how to get started?

Sanction answered 9/6, 2017 at 10:19 Comment(4)
Python definitely could do this, but if efficiency/speed is at all important to you, use Java or C/C++ for complex user interfaces. Java has great UI support but is more cumbersome, C/C++ has SFML (personal favourite but others are available)Complemental
@Complemental Is it possible to just create a Java application using Python though? To have a better GUI?Maus
Honestly I don't know the details anymore this is almost a 3 year old post. Frankly for attractive frontends, electron with js is just the right answer nowadays. Especially if you're not running any hard computations client side. Writing java with some javafx can render good results thoughComplemental
You can try: customtkinter.tomschimansky.comEuromarket
A
18

Best options I've seen for 'pretty' GUIs with python is Kivy, see the gallery of examples

Acarus answered 9/6, 2017 at 10:46 Comment(0)
D
8

Like what people have already said, it depends on what you are trying to put inside of your GUI and where you want to put it. But, all of the other GUI programs that others have suggested were hard for me to download and downright difficult to learn. I assume you have used tkinter before (which has disappointing aesthetics), and are unwhelmed by the format of the premade button, entry, and other widgets.

What I recommend doing is not downloading other libraries and software, but rather sticking with tkinter and only using label widgets and the bind function, which is detailed here. What the bind function allows you to do is call an action (function) when a mouse click, keyboard entry, etc... occurs over a certain widget. Essentially, you can make a button by binding the mouse click action with a label. Whenever you click on the label in the GUI, the function is called, however, now you don't have the ugly border around the text and it looks nicer. Similarly, you don't have to use the entry widget, you can bind a keyboard event over an empty label. Then inside your code, you can add whichever keyboard letter/number you press into the stringvar that control the text in the label. The list goes on and on, but essentially you would be using only labels, frames, and canvas' with the bind function to make cooler looking GUI's.

Here's an example of how I made a nicer looking radiobutton grid... enter image description here

With this, I can customize the size of the circles to match the size of the text, change the color of the selected and unselected circles, and change the spacing between the text and the button circles.

Dropkick answered 22/7, 2018 at 18:51 Comment(0)
E
6

Hi it looks like what you are asking is EXACTLY what pysciter is targetting. The only caveat is the fact that this is still new and possibly a bit green

https://github.com/sciter-sdk/pysciter

Eyeshot answered 11/6, 2017 at 16:23 Comment(1)
Unfortunatelly python is not fully supported but thanx for this answer anyway. Great FrameworkNap
R
5

It depends where you want to use these dashboards, for device independent applications for IoT stuff (like Raspberry Pi), I would prefer Thingsboard as its opensource. Otherwise if you don't care about Losant is also a good choice. But as scotty3785 mentioned, for not webbased applications Kivy is a very good choice.
But it just depends on your case what you choose.

Reflector answered 10/6, 2017 at 22:47 Comment(2)
I don't want to create dashboards. I asked to using on every type GUI's. For example on a calculator app or on a basic GUI app too.Hekking
Your examples are dashboards, anyways I think kivy is what you are looking forReflector

© 2022 - 2024 — McMap. All rights reserved.