Live data from Hacker News

Guietta – Python module to create simple GUIs

github.com

131–140 of 166 posts

Re: Guietta – Python module to create simple GUIs

#131
post #43
post #32

Earlier quoted context omitted.

Ah I came to comment this. Loved the GUI builder in Delphi, it's where I cut my teeth learning to program as a teenager. Since then, I've seen .NET within Visual Studio almost get to the same quality we had with Delphi in 1995, but still way off. Now that everything's a web app wrapped in something like Electron, it should be so much easier to have tooling like this, but yet we're all still building hugely complicate…

I personally think the real reason those types of tools seem less common and popular today is that people remember for example the reputation that Visual Basic programmers got (by the way, I was one). Basically, any really convenient RAD/GUI tool has an association with beginner programmers or even users. The last thing programmers want to be identified with is a user. Programming is manipulating cryptic colorful tex…

Have you tried QtCreator? If so, have you also tried QtDeclarative?

Having used QtCreator to build a medium sized GUI, it was a pain. The XML it produces is too unwieldy to manually edit, so that's out (though I did edit it a few times to overcome bugs in QtCreator)

The QtCreator GUI itself is very robust but if you want to do something that's off the beaten path good luck, you're gonna be doing a lot of trial/error clicking and iteration. There were times when everything was "right" in QtCreator, and the result didn't work...

I would much prefer to use something like QtDeclarative if I do it again. It's easier to tell the computer exactly what I want, and then get exactly what I want, when the language for expressing what I want is concise and small.

Re: Guietta – Python module to create simple GUIs

#132
post #120

That's really neat. It reminds me of generating a CLI based on docstring, which is another pattern that I like a lot.

Are you by chance talking about docopt? I love that tool! http://docopt.org/

Yep! I love it for simple projects.

Re: Guietta – Python module to create simple GUIs

#133
>>> 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.

Re: Guietta – Python module to create simple GUIs

#134
post #130

Earlier quoted context omitted.

It's been a while (I've never done autolayout and up) but I found Xcode Interface Builder to work in the fashion you describe. Probably not an accident as it descends from NeXT devtools which inspired e.g. VB (not sure about Delphi).

How well would these tools have worked with source control? Interface builder effectively uses XML files, but they are not meant to be edited/understood by humans. This effectively hides a layer of the "onion", but it makes it tricky to follow changes checked into VCS...

Well XML is still better for that than binary, which I suspect VB was. We did have Xcode project files in git and it was ok.

Re: Guietta – Python module to create simple GUIs

#135

I don't want to shit on anyone's work but there are so many wrappers around qt, gtk and the others. I wish more people were writing guis frm scratch as opposed to wrapped the same old shit.

This project explores an extreme niche in original ways, which is the whole point of adding to the existing "so many wrappers".

And regarding the "same old shit", you'll be entitled to spit on mature frameworks when your GUI from scratch supports screen readers, 3D acceleration and printing with the same API on Windows, Linux and OSX.

Re: Guietta – Python module to create simple GUIs

#136

This might not be obvious, but the name appears to be a pun in Italian on the name Giulietta (Juliet), known for cars and for the shakespearean play. It made me chuckle a bit :)

Guietta author here. In fact I am Italian, but the name is just a diminutive of "GUI" - in Italian it sounds something like "small and cute GUI". I have a friend called Giulia and she initially thought that it was dedicated to her :)

I was expecting it to be a play on goetta, a type of sausage.

Re: Guietta – Python module to create simple GUIs

#137

>>> 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.

Couldn't you simply do something like

>>> from guietta import _ as underscore

to fix this?

Re: Guietta – Python module to create simple GUIs

#138
post #130

Earlier quoted context omitted.

How well would these tools have worked with source control? Interface builder effectively uses XML files, but they are not meant to be edited/understood by humans. This effectively hides a layer of the "onion", but it makes it tricky to follow changes checked into VCS...

Well XML is still better for that than binary, which I suspect VB was. We did have Xcode project files in git and it was ok.

VB FRM files were text based.

Re: Guietta – Python module to create simple GUIs

#139
post #75

This is so timely! I am teaching CS to some high-schoolers and they just got introduced to Python, I want to hook them by getting them to make something that they can play around with. Could use this there :D Somehow, it feels like, CS education is getting both easier as new low friction tools are being made available each day and getting harder because the sheer complexity and number of things to know to really unde…

As a former high-school student who has done many little projects with tkinter at that time, I would recommend against dumping tkinter altogether for several reasons: - with higher complexity comes higher versatility. I liked how it enabled me to be creative - there are two well-written reference websites for learning it easily despite complexity (and that's important if you want your students to like/learn to read t…

What are the URLs for those two well-written references you mention? Thank you.

Re: Guietta – Python module to create simple GUIs

#140

Based on the very limited documentation it seems to follow a similar approach to PySinpleGUI https://github.com/PySimpleGUI/PySimpleGUI PySimpleGUI is indeed simple and quick, not very elegant but useful for small utilities.

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?

Post reply on HN