Posts about python (old posts, page 3)

2004-02-02 20:34

And so does uqbar

It's better than I remember. Specially because the SF CVS version is newer than all the copies I had on disk (I wonder how that happened).

In fact, it has a nice trick to create error dialogs from any exception I am lifting right away for other apps :-)

The only problem it does have is that python's urllib and urllib2 support for FTP seems to suck.

You can't choose the username and password?

Sailor (Gutenberg's main server) is picky about the password you send, and [email protected], which urllib insist on using ([email protected]) doesn't pass muster.

And ftplib, which can do the right thing, doesn't let me give progress of the download, which would make the program awful.

Oh, well.

2004-02-01 18:41

Good news in PyQt

Phil´s support is great. That´s good enough news, but he helped me make images-and-http-in-qtextbrowser work again.

I think I will package that widget neatly, because it´s of general usefulness.

2004-01-26 13:10

Synergy with myself.

Is there a name for that? It's like picking oneself by one's bootstraps.

But anyway, I have been writing a bunch of little PyQt projects in the last year or so, and they all seem to share something with each other.

Writing KrSN, I worked on making a pseudo/browser using QTextBroser... which is the note-displaying element in Notty... which now is getting a reStructuredText editor... which will be used in Bartleblog... for which I learned how to use XMLRPC.. which I will use to write a Notty server... and so on.

Of course, since I am doing all this as a hobby, a reasonable release of all these apps is still months in the future (KRsN is usable, although incomplete, Notty will probably be out in a decent shape first), but I am only coding for fun, any use anyone gets of it is strictly a happy side-effect, so... it's amusing in its own terms.

2004-01-24 11:36

Neat stuff

This is a recipe at the Python CookBook showing how to add a new directive to reStructuredText, called code-block, which syntax-highlights the block!

I just implemented it in Notty, and now you can have the neatest code snippets. I did have to hack the output a fair bit since the displaying widget doesn´t support <span> (or CSS for that matter), so I had to do massive search-replaces on the output, to convert to <font>. But it took only half an hour to do, since SilverCity´s output is very regular.

I think I will suggest this to Hugo for PyDS, considering the density of programmers among its users :-)

2004-01-10 13:06

Whoa. Hits!

Looks like the programming tutorial was well received. About 5000 hits in 12 hours :-)

Today´s ranings:

Lateral Opinion (link) 2355 SPE - Stani's Python Editor (link) 86

If it continues, Lateral Opinion will reach 50K hits today. I´ll have a beer for that!

2003-10-27 17:33

Post-facto inheritance

Now, I didn't expect this to work at all!

A QlistView is a sort of tree widget, and is drag&drop enabled.

The trick is, you have to reimplement dragObject() so it returns a draggable thingie after you drag something.

But, since I am using designer to draw the forms, I have to use a real QListView, not a child class.

Conundrum? Custom widget in designer? Not with python!

def myDragObject(self):
return QTextDrag("something",self)


And that works! I know it should work in python, but QListView is implemented in a C++ module!

The guys that did PyQt really made it well.

2003-10-23 18:13

Nice side effect

Looks like the kind fellows at have a working PyKDE, and I got it while I was upgrading.

That's useful because I really wanted to hack some into KrSN (the RSS aggregator tool I once wrote), and it needs PyKDE.

I hadn't done it because building PyKDE on a PII, 233MHZ, 128MB of RAM (the only one I have on the Internet) is really NOT fun. But once I got it on RPM, using it works just fine :-)

2003-10-15 01:00

Advogato post for 2003-10-15 01:00:42

Now, if this appears in the site, bartleblog has advogato support..

And you, readers, if you want a slow, not fully functional PyQt based advogato (and other blogs) editor, then you can use it too, just search for bartleblog in

Now, if I implemented caching, and correct date formatting, and a decent HTML editing interface, this could even be a decent app.

Contents © 2000-2019 Roberto Alsina