Live data from Hacker News

Guietta – Python module to create simple GUIs

github.com

141–150 of 166 posts

Re: Guietta – Python module to create simple GUIs

#141

Earlier quoted context omitted.

What do you mean by the ecosystem?

The available libraries. For Python/JS, I can find libraries to do basically anything I want, but not so for Lazarus libraries.

Python4Delphi project has been around for around twenty years now, allows using Python from within a Delphi/Lazarus GUI framework: https://github.com/pyscripter/python4delphi

Re: Guietta – Python module to create simple GUIs

#143

Earlier quoted context omitted.

Delphi wasn't like that. There'a a gap a mile wide between 1) tools like Delphi, VisualBasic (the classic version, not .net), and to some extent, HyperCard 2) GUI builders, which were popularized by Visual C++ #1 doesn't have (visible) layers or abstractions. It's a different way to represent your program. You place a few controls, tie them to actions (code), and that's your system. #2 is like onions, with lots of me…

There is one GUI builder in Java I forgot the name, a plugin for Eclipse from Google, that allows to build GUI by drag and drop and jump into the code. It works directly by reading and writing any java code file, there are no extra files and layers of abstraction. It could understand Swing, SWT and a couple other major UI frameworks. That's the only thing I know that's really seamless like old times.

WindowBuilder

Re: Guietta – Python module to create simple GUIs

#144
post #53

Earlier quoted context omitted.

Why not? I mean, it shouldn’t be _the_ deciding factor but it certainly should contribute greatly to the decision. Tools get popular for a reason. You get community support and a test-of-time guarantee that whatever you invest in today is more likely to last compared to the niche choice.

> "Tools get popular for a reason" Sometimes/often for completely wrong reason. And even if the reason was good in particular context then suddenly the tool gets dragged to be used well beyond the original intent.

I like how you've nominated your own opinion as being the right reason, and everyone that made the tool popular as having the wrong opinion.

Re: Guietta – Python module to create simple GUIs

#145

>>> from guietta import _, Gui, Quit I am not looking forward to taking over projects using that framework abusing underscore and double underscore magic variables. The underscore "_" is a pseudo reserved variable in python. It is used in assignments like year,month,_ = readdate() to discard the return value and disable the lint warning about it.

It's worse than that actually, as in some cases the single underscore is actually meaningful (see the SO question linked in [1]). My recommendation is always to use a double underscore for throwaway variables, particularly since dropping into an interactive terminal can be really useful in some particularly hairy debugging situations (there's a great pycon talk about when it's a good idea to do gross things like that during debugging [2]).

Guietta looks interesting, but at a certain point if you're going to go with a visual representation of your gui to automatically generate it, you might as well go the whole docopt-style way and just have the whole gui defined in a docstring. That give you flexibility to have your own DSL as well (or jinja2 templates, or whatever), if you so decide, instead of needing to shoehorn python lists into the job. Plus that way you could actually modify the layout spacing, without much increase in complexity.

That being said, my usual recommendation for "I need a simple python GUI" is Toga [3]. The only downside is that Windows support is lagging behind MacOS and Linux, but it's not that far behind, so for simple stuff that should be reasonably acceptable.

[1] https://stackoverflow.com/questions/5893163/what-is-the-purp...

[2] https://www.youtube.com/watch?v=bAcfPzxB3dk

[3] https://toga.readthedocs.io/en/latest/

Re: Guietta – Python module to create simple GUIs

#146
post #4

Every time I see something like this I think back to the glorious days of Borland Delphi with it's beautiful drag&drop GUI builder.

And WinForms/Visual Basic There was just something so natural about the way you could quickly throw together a UI and then hook everything up to it.

There are some disadvantages, though. If you're looking at WinForms or VB UI with two buttons, e.g. yes/no, there are things you can't easily and naturally see at a glance.

* What's the tab order? (Usually whatever order they happened to be created in, which is often wrong after the UI has gone through some changes.)

* Are they really exactly the same size or only almost the same?

* How do they behave when the window is resized?

* Does one button have one of its many properties set slightly differently from the other one? (Have fun inspecting them all and make sure to not accidentally change anything while doing so.)

* Did you just accidentally move one of the buttons one pixel while inspecting things?

I prefer doing the UI in code, so that everything is clearly spelled out and not hidden in some properties panel. In WinForms it works pretty well with TableLayoutPanel.

Petzold wrote about this approach: http://charlespetzold.com/etc/DoesVisualStudioRotTheMind.htm...

Re: Guietta – Python module to create simple GUIs

#147
post #4

Every time I see something like this I think back to the glorious days of Borland Delphi with it's beautiful drag&drop GUI builder.

Second this! I was soo excited about the Google App Maker as the cloud equivalent, but of course, they shelved the product and will turn it of Jan 19th 2021. The alternative they are touting, "AppSheets", isn't really the same and geared towards "no code".

Re: Guietta – Python module to create simple GUIs

#148

Earlier quoted context omitted.

Yes, I was inspired by PySimpleGUI (and say as much in the introduction: https://guietta.readthedocs.io/en/latest/intro.html ). But I felt that PySimpleGUI did not go far enough in making things simple. It also supports multiple backends, so that may be a reason to keep things more structured. Guietta is just a thin wrapper over QT.

> Guietta is just a thin wrapper over QT. So, any pro'n'cons in comparison to PyQt?

Not the author, but I assume the one big pro is being a lot simpler, and the one big con is that it limits the flexibility of the full QT bindings.

All in all, it's a wrapper that hides complexity and flexibility from you. Might be what you need some times.

Re: Guietta – Python module to create simple GUIs

#149
post #56

Earlier quoted context omitted.

In my other life I used to manage bunch of developers while still developing myself. My criteria for hiring them generally was not their proficiency in particular tool but ability to grasp programming concepts in general and ability to grok any particular tool in short time. Practical experience in particular areas of course was a big plus. Over the time this strategy proved beneficial. My team ended up having the hi…

>My criteria for hiring them generally was not their proficiency in particular tool but ability to grasp programming concepts in general and ability to grok any particular tool in short time. I'm curious how did you test candidates for this? Did you give them any specific tasks to accomplish and then evaluate their ability to learn?

I asked them what did they do (projects) and how exactly and what particular parts they were responsible for. After that if I still feel interested I would proceed to delve into details like how they handled this problem/that problem/etc. Sometimes would check references. This would give pretty good picture of what the candidate is capable of. I do not remember being disappointed.

Re: Guietta – Python module to create simple GUIs

#150
post #53

Earlier quoted context omitted.

> "Tools get popular for a reason" Sometimes/often for completely wrong reason. And even if the reason was good in particular context then suddenly the tool gets dragged to be used well beyond the original intent.

I like how you've nominated your own opinion as being the right reason, and everyone that made the tool popular as having the wrong opinion.

I said "sometimes". Do not put words in my mouth.
Post reply on HN