Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Data-aware widgets in PyQt

Here's the chal­lenge: a nicer ver­sion of Qt's data-aware wid­get­s, us­ing PyQt.

Did I suc­ceed? Prob­a­bly not, but it was in­ter­est­ing to do. Maybe it will be in­ter­est­ing to read about ;-)

Trac is cool. Cherrypy is cooler.

Trac is cool. Easy to set up, easy to run, low main­te­nance, and you get:

  • A tick­­et­ing sys­tem

  • Mile­­s­tones

  • A we­bcvs-­­like thing for sub­­ver­­sion

  • A wi­­ki (I mean,. what does­n't pro­­vide a wi­­ki nowa­­days?)

  • Bug re­­port­ing tool

  • The bug re­­port­ing tool and the sub­­ver­­sion change­sets can be linked us­ing Wi­­ki markup (now that's cool­er than it sounds ;-)

  • You don't need to be root to set it up, and you don't need apache or any­thing else, re­al­­ly.

Re­al­ly, re­al­ly nice stuff.

On the oth­er hand, Cher­ryPy is a tool that lets you "pub­lish your python ob­jects on the we­b", which does­n't re­al­ly mean much, but here's what I fig­ured out:

Cherrypy is the first way I have seen to write a useful web-based app in a reasonable amount of time and pain.

Ex­am­ple, I wrote a fron­tend to cla­mav (al­low­ing me to re­mote­ly trig­ger scans of in­di­vid­u­al nodes on a net­work) us­ing Cher­rypy and py­cla­mav in about 200 lines of code.

It works like a char­m, it's ro­bust, it even can be made to look nice us­ing some sort of tem­plat­ing en­gine (haven't both­ered yet).

And of course, I con­trol that ba­by us­ing a Trac project :-)

Breaking radio silence

The main bad thing about PyDS is that you need your own com­put­er, and you need it to be con­nect­ed to the net­s.

I had my own box, but since I changed em­ploy­men­t, it was a lone­ly dis­con­nect­ed box, un­til this week.

So, what hap­pened in the last few month­s...

  • I am cod­ing some lit­­tle stuff, as usu­al

  • I am gonna get mar­ried

  • I moved with Rosario (rather both of us moved in­­­to a new place)

Read The Con­fu­sion and The sys­tem of the world so I can print that "I sur­vived the baroque cy­cle" T-shirt Lots and lots of oth­er things. Most­ly good, too :-)

Ok, so not **everyone** read my calculator rant

First of al­l, a note: I in­tend all this post as en­cour­age­ment to Emil­iano, the au­thor of Kalcoo­lus.

You see, he turned bc in­to a on-screen key­board thing . I don't like that UI much .

I can't post com­ments on kde-look (for­got my id, or maybe nev­er reg­is­tered), and I am not go­ing to reg­is­ter just for this, but it's in­ter­est­ing to see how the same idea is re­cy­cled over and over and over.

This app seems to be a con­fla­tion of the fol­low­ing:

  • Writ­ing fron­­tends is good, be­­cause you don't need to write the hard part

  • A GUI cal­cu­la­­tor has to look like the re­al thing, in the name of us­a­bil­i­­ty

Well, the bad news is: writ­ing fron­tends is frag­ile. What you want are li­braries. And if GUIs had to look like the re­al thing, the UI to Skype would be a numpad, the UI to Amarok would look like an Ipod, and the UI to KWord would look dif­fer­ent .

So, please, Emil­iano, put a CLI in it. Pret­ty please? :-)


Contents © 2000-2024 Roberto Alsina