RSS for SVN

Phil has finish to hack the SVN hooks to produce a RSS feed for the latest commits. This is pretty kool ? Now I don’t have to manage a mailing list for SVN commits.

I’m just wondering why his feed is out-dated on the python-weblog, and isn’t on the python-planet ?

Python web developpement: the dilemma / Act 2

After a long trip around the Python web developpement tools, it’s time to fix. In a previous post (please read all comments before ..) we have talk for a long time about various web frameworks. Here is my personnal conclusion:

  • A web framework has nothing to do with templates. It need to allow to wrap templates easily, but it should’nt deal with them directly. (I have done DTML in a past life.. no thanks:)
  • A web framework has nothing to deal w/ the object-store. It should let me store objects as i want (without too much pain)

In the previous post we talk about the different approach: Threads, Mod_Python, Twisted, and Fork (in comments)

I have tested quite a bunch of framework right now, all have some nice feature, and drawback. To conclude my tour and explain my choice, some little points:

Webware

I really enjoy Webware, because the API is really easy learn, and work like a charm. But as explain before, I have too much trouble w/ the threads in.. I hope cheetah will cleanup the way it includes Kits.. a long thread on the mailing list.

Mod_Python

I don’t like the mod_python Publisher etc etc, I feal too close-to-apache. So i guess the I will choose MP Servlets. Performance are really good, and doesn’t need to maintain a server process on the host. This is good news because i want to host a couple of little websites. The major drawback is that there is no way to maintain (or even limit) a pool of objects between request. (without apache tweak) Another bad point is that debugging is awfull, need to restart all the time ..
But mod_python offer a lot for deployement..

Twisted

This is the most flamewar subject, I ever seen on the Python community. I used twisted, and yes it’s really fun and powerfull. But I don’t want to mix deferred and threads (for DB .. and others stuffs). If I want to mix differents networks stuffs, twisted is my tool. but as previouly said (comments) I ‘m not really fuent with twisted.web

Skunk-Web

Hum, this is a fork based server.. I haven’t tested it a lot because it’s really template base, and I want to use Cheetah or ZPT not another-templating-o-matic. And fork, may cause issue if you have some hits (but skunk really seems to work well under heavy load so.. )

And now..

So, yes, i haven’t choose one of this. In fact, in the previous post somebody ask me about Quixote, so i decided to test it. And I found an interesting stuff,
Quixote use: scgi (mod_scgi + daemon), old-fashion-cgi or mod_python, medusa or twisted.

So I can:

  • use mod_python in production area. (nothing more than apache :)
  • use mod_scgi if i want to run the server as a different user. No need to use su-exec or fight w/ ownerships…
  • use medusa to develop. And that’s a really good point because i can use pdb to debug,and avoid to restart mod_python again and again.
  • use old-fashion-cgi on system that only provides this..
  • test Durus + Dulcinea for the fun.

There is some drawbacks of course:

  • really small documentation right now (check the Quixote Wiki)
  • I don’t really like the way it map the URL namespace to the modules
  • come w/ custom templating system, but cheetah has a handler (infos in the wiki)

As Phil said: This is your new toy, until the next.

He’s right. I dream one day, Python web’s framework will be more unified. Quixote is a good example of what power we can achieve if the framework cover a large amount of different approach in a unified way.

Better window placement for every WM

I’m using xfce window manager since a while now. I’m only using the taskbar and the wm in fact. But i was looking for a feature for a long time. Xfce wm doesn’t support matched window placement (ala sawfish).

For example, there is no way to place gkrellm on every workspace, or tell Kmail for stick on workspace 2. Yesterday, while surfing, i discover devilspie.

Example:

<!-- For gkrellm: place on every desktop, and hide in the tasklist -->
<flurb name="gkrellm on all Desktops">
  <matchers>
    <matcher name="DevilsPieMatcherWindowName">
      <property name="application_name" value="gkrellm"/>
    </matcher>
  </matchers>
  <actions>
    <action name="DevilsPieActionSetWorkspace">
      <property name="pinned" value="TRUE"/>
    </action>
    <action name="DevilsPieActionHide">
      <property name="skip_tasklist" value="TRUE"/>
    </action>
  </actions>
</flurb>

<!-- stick Kmail on desktop 4 -->
<flurb>
  <matchers>
    <matcher name="DevilsPieMatcherWindowName">
      <property name="application_name" value="KMail"/>
    </matcher>
  </matchers>
  <actions>
    <action name="DevilsPieActionSetWorkspace">
      <property name="workspace_index" value="4"/>
    </action>
  </actions>
</flurb>

Comments of this blog

I really enjoy the quality of the comments published on this blog. Beside, my post aren’t really interesting for most people, this blog get a lot of feedback from the Python community, and Linux Users (mainly wifi related).

The main issue is that most of comments aren’t read by other people because they aren’t aware of the post. so I decided to make to comment RSS feed public.

The comment RSS feed is: http://www.larsen-b.com/comments_rss .
So take you favorite rss reader (bloglines is really fine, but slow right now) and add this :)

That’s why Bush will be the next president ..

Oh god, read this on slashdot:

  • "Geeks, what are you using for home defence ?",
  • first answer: "Buy a gun .."

Here in France, quite nobody have a gun, and guess what .. if you kill an intruder you will go in jail! and that’s fine. I’m wondering if you look at me as a love-and-peace smoker, but i’m not. That’s the law, you can imagine killing an intruder just because he has break your car ? I’m not.

I have the feeling that U.S.A is a country where:

  • you can kill for a cigarette
  • you have to believe in Jesus
  • vote for Bush
  • forbid cigarettes, alcohol..
  • eat junk found

Slahdotters are you killers ?

I think, I should ask for everybody reading this blog:
"Do you have a gun ?", and ban people that say: yes

Ouch !

I write a couple emails to the commercial service of Weemote, to buy some dV remote. This guys are pretty cools, and they are going to ship the weemote to France, even if they official doesn’t support it.

And tonight i receive this:

Just to let you know, we are being threatened by a major hurricane here in
South Florida so we may not be able to ship quickly. However, we will do our
best.

John

Full featured SMTP in Python ?

In a recent post Ian explain he get a lot of trouble w/ the configuration of his mail system. I ran into the same issues a little time ago. Now i’m using postfix and courier-imap and maildrop to dispatch the mail between. This setup is really easy because Postfix just accept incomming mail, and maildrop deliver it in the right imap folders. By this way, i only have to tweak maildrop to add some users. And works fine with virtualhost. In my current setup, i’m using a home-made spambayes deamon (sb_global_server), to spam-tag all incomming mail. (even for virtual host users)

Now, i need to setup a mailing list manager… and issues are back again :( I read the mailman howto, and no, it doesn’t support virtual-hosting out-of-the-box. Play with a bunch of alias? no thanks… I can use another one of course, but intregation w/ postfix is not so-trivial for most of them.

So why not write a full featured SMTP daemon in Py? We will get:

  • a system that can scale easily ..
  • support for most of db-backend without a pain
  • can embed spambayes .. or any other filtering system in only one piece of code ..
  • only one users configuration (not to use LDAP or others to glue..)

Right now, if you want to have a good mail system you need to use a bunch of stuffs, written in a bunch of langage .. and use a bunch of tricks to glue each others… But everybody wants a nice/simple mail system ?

What ‘s wrong w/ Sony Vaio K115S Designers ?

Yes, i get another notebook on my desk. In fact, i buy a Sony Vaio K155S for a uncle. I won’t publish a long post about installing Linux on this, because he will use Windows XP. I spend some hours to install several things: OpenOffice, WinSCP, Mozilla etc etc ..

This notebook run really smoothly, it has great CPU, and video card. Playing RTC, is really fun!

It has been a long time since i played w/ XP. I now i’m remember why i don’t like it. I spend most of the time to ask me: my name, my company and my serial number. And yes, this is too intrusive for me… and I’m wasting my time! Every vendor, want to know everything .. my sex lenght? nobody ? :))

Anyway, despite I found this notebook really kool, I think the design is really bad:

  • Most of users are right hand mouse user? But Sony put the USB pub on left !!
  • Sony put the power supply connector on the right .. so the cable is under the DVD tray …
  • The battery capot sound cheap .. it make noise in fact :(
  • The PCMCIA seems to be cheap too, inserted card aren’t well lock ..

I’m currently writting a Knoppix DVD edition on this stuff to test :)

Linux Kernel Hackers remove the Philips USB Webcam support

Everybody hate binary kernel module: that’s clear, but sometimes that the only way to use some hardware.

This is really a bad news to all webcam users: USB kernel hackers decide to patch PWC kernel driver to avoid the use of the extended kernel module which is binary only. Check out this for more infos.

update: read this thread. Why Philips doesn’t provide spec ?