|
wxPython, with the added help of wxFormBuilder, (because writing interface code/data by hand is hell).
|
|
|
|
|
Asday wrote: wxPython, with the added help of wxFormBuilder
Searched on this and I see that it says this is "bundled" with python and it is an alternative to tkinter. Thanks. Basically what I'm learning is there isn't a great way to add a GUI on top of python. But also understand Python may be used for other types of things too.
|
|
|
|
|
I don't think wxPython is part of the stdlib at all, is it? That's news to me.
I also don't particularly agree with you that there "isn't a great way to add a GUI on top of Python". When you use Visual Studio to make a XAML or WinForms interface, the code that gets written by that is still really mealy awful code, but because the tool writes it for you, you don't notice as much. It's the same with wxFormBuilder, it just happens to be third party.
I understand you can do similar with Glade and GTK.
|
|
|
|
|
Asday wrote: I don't think wxPython is part of the stdlib at all, is it? That's news to me.
I believe you are correct.
However, it was quite easy to get it installed in my Anaconda environment.
conda install -c conda-forge wxpython
After that there is a very simple example that worked great.
import wx
app = wx.App()
frm = wx.Frame(None, title="Hello World")
frm.Show()
app.MainLoop()
Worked great!
wxPython, for the win!
|
|
|
|
|
Indeed. You'll wanna make sure you've got phoenix (wxPython version >=4) installed, and definitely for sure use wxFormBuilder instead of writing your interfaces by hand.
|
|
|
|
|
Haven't done Python UI stuff in a while, but when I did -- PyQt (I used 4, but I believe there's a 5 variant now). I really found it to be quite rewarding. IIRC you can code by hand (which I preferred) or use QtDesigner to code UIs WYSIWIG style and use them in Python.
PyQt is cross-platform and, I found, looks better than wxPython, which I also found to be way more difficult and restraining, since it tries to fit a generic paradigm to GTK on linux, Windows native UI and Darwin native UI. Qt has the freedom to provide a unified way to work on things and stuff actually works -- then the output is styled by default to feel native on the hosting platform.
------------------------------------------------
If you say that getting the money
is the most important thing
You will spend your life
completely wasting your time
You will be doing things
you don't like doing
In order to go on living
That is, to go on doing things
you don't like doing
Which is stupid.
|
|
|
|
|
PyQt sounds interesting ... I am trying to learn Python in my
spare time (if any left ...), and indeed, Python GUI dev is not obvious
when looking from C#/WinForm or C++/MFC perspective.
I will give PyQt (with PyCharm) a try ...
Thanks for the suggestion,
|
|
|
|
|
Davyd McColl wrote: PyQt (I used 4, but I believe there's a 5 variant now)
Thanks for the info. I will check it out.
|
|
|
|
|
I actually quite like wx's native widget implementation - it buys you the learnt familiarity with the conventions of the platform your user uses, for free.
|
|
|
|
|
I have not used in recently but once had to make a GUI and found that easygui, https://pypi.org/project/easygui/ was in fact quite easy to use. The GUI choices are basic but functional
|
|
|
|
|
I will take a look at it. Thanks for the info.
|
|
|
|
|
Flask is another web-based approach to providing a GUI for Python scripts, which seems to have a somewhat less steep learning curve than Django. It is easier to learn what you need to know for a particular project and progressively build on this.
|
|
|
|
|
|
kivy works for me - good results on windows & android
|
|
|
|
|
If you want a Microsoft Windows interface, which is still 85% of business desktops, that will run whether your programs are running on Linux or a Windows box that can interface with anything which Windows can interface, like ActiveX controls, .NET controls, I use a software tool called SP2 from Flexus International. It is written in C and I use it with current C development and past development with Cobol. It is not open source so there is a cost, but it is worth it and a great product. SP2 is royalty free. I plan to embed Python in my current C application and while I haven't done it yet, I think Python, which is also written in C, should be relatively easy to interface with the SP2 API. I have interfaced SP2 with a Business Basic app, and Python should be much easier. I have used the Flexus products (flexus.com) since mid-90s and they are top drawer. I have used the Flexus products with various flavors of AIX, Unix, Linux and all Windows versions. If you run your apps on AIX/Unix/Linux you do so using windows clients and all displays, mouse and key clicks go to the windows client via software Thin Client. Flexus also has a product called Web Client X that renders the Windows screens into HTML/CSS/Javascript/Ajax for a complete browser interface with very little code change. SP2 and WC/X are lightning fast and of course will run on any platform with a browser. If anyone is interested, I will be glad to share my Python/SP2 interface with them when I finish it.
|
|
|
|
|
Sounds very interesting. Thanks for the details.
|
|
|
|
|
Over the last 15 or 20 years, I've used wxPython and web-browser UI. Alternatives haven't filled the bill for one reason or another.
Question: How have I chosen between wx and browser? Answer: Which was used for the most recent project? Use the other.
Seriously, the grass has been oddly greener over several cycles.
So, apparently, my next project will be browser-based. Because the last one was wx.
Note: I've wanted to use Tkinter because it comes with Python. But, jeez. Have you experienced its out-of-box?
|
|
|
|
|
We build GUIs for Desktop in Python all the time in the visual effects industry, using Qt as the main library.
While Qt is primarily C++, there are full python bindings (official as well) that you can use to create your interfaces without ever leaving Python.
|
|
|
|
|
Shouldn't a landlady be the opposite of a mermaid?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I don't know, but you shirley don't want to myth your rent.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
That must come up at lease as off-fin as . . . what?
I cannot flat-out say.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I don't know, but I once made the mistake of referring to a female accountant as a bag lady. I thought she and her husband would get the joke, and it was rather embarrassing when they didn't.
|
|
|
|
|
Well, I think the problem is with the joke, because I also don't really get it...and wondering if there is something to get...?
Google isn't helping.
|
|
|
|
|
Bagman is slang for someone who controls the purse strings. It usually involves shady dealings, but since it was supposed to be a joke...
|
|
|
|
|
Greg Utas wrote: since it was supposed to be a joke...
Well at least now I know.
I'll have to ask some accountants if they've ever heard the term. But then, I don't know many accountants...
|
|
|
|