Skip to main content

Ralsina.Me — Roberto Alsina's website

My first public python code works!

No, this is not a post an­nounc­ing I just wrote my first pub­lic python code. This is a post about my first pub­lic python code... from 1996!

In 1996, the soon-­to-be-here year of the Lin­ux desk­top was fu­eled by one of the mar­quee open source ap­pli­ca­tions of the time: LyX.

LyX was (is) a sort of word pro­ces­sor where you wrote and gen­er­at­ed La­TeX which then pro­duced what­ev­er you used to print. But I am di­gress­ing: LyX was cool be­cause it used one of the first good free graph­i­cal toolk­it­s: XForm­s.

Ok, it was not re­al­ly free, be­cause you could­n't dis­trib­ute patch­es.

And it was not all that good ei­ther, but we were com­par­ing it with Mo­tif, so it was much more free and much bet­ter than that mon­stros­i­ty.

BTW: The lat­est re­lease of XForms is from au­gust of 2009.

At the time, a 25-year-old me was in love with Python 1.3. Here's how I de­scribed it:

Python 1.3

It's a beau­ti­ful ,free, lan­guage. Get it from ft­p://ft­p.python.org http://www.python.org

Yes, Python 1.3. So, I want­ed to use this C GUI tool­kit used in this cool ap­p, and this neat lan­guage I was learn­ing and use them at the same time.

I ran (not walked) to my faith­ful Slack­ware 3.0 ELF in my 486DX2 PC and start­ed hack­ing. In a week­end or so I had a work­ing bind­ing.

I even start­ed writ­ing the holy grail of desk­top ap­pli­ca­tion­s, a GUI ver­sion of Pine, us­ing python and its IMAP mod­ule (python mail­er, or PyM):

//ralsina.me/static/im1.jpg
//ralsina.me/static/im2.jpg

I re­leased ver­sion 0.1 al­pha in 1996, May 13 ... and a few months lat­er Matthias Et­trich start­ed KDE and I found Qt and nev­er thought about XForms again.

Un­til this month.

For rea­sons that don't mat­ter, I men­tioned PyM in the PyAr mail­ing list the oth­er day, and ... well, would pyx­forms still work?

Why, pret­ty much, yeah!

I got the pyx­form­s-0.1-al­pha sources from some­where in the in­ter­net, in­stalled XForms 1.0.92sp2 (yes, the lat­est re­lease, from three months ago), of course I al­ready had python 2.6.4 in­stalled, added a set­up.py, edit­ed 10 lines of code and...

im1

Yes, it work­s. You can get this 0.2 ver­sion (co­de­name "C­thul­hu was here") here just 13 years af­ter 0.1.

No, I don't un­der­stand the weird round­ed cor­ner­s, or why the cur­sor looks weird and old when it's in­side the win­dow.

It's a RE­AL­LY small and fast toolk­it, though.

Hon­est­ly, is it use­ful for ay­one? Al­most cer­tain­ly not. Am I amazed some­thing I wrote in 1996 still work­s? Oh, yeah I am.


Contents © 2000-2023 Roberto Alsina