Archive

Archive for May, 2008

and the runner is…

28 May 2008 Ivo Leave a comment

well, in the spare time I have coded the software which has been in my wishlist for a few weeks: the runner.

runner.py is a small program which takes an xml configuration file as input, manages the actions defined for each item in this configuration and checks that they’ve correctly been performed.

in a couple of lines (they’re almost the same in python):

configuration = parse(xmlsource)
for priority in configuration.priorities:
    play(priority)
    windup(priority)

and play is like the following

for each operation in configuration.operations[priority]:
    eval("self."+operation.get('type') + "(operation)")

and the windup is like the following

for each operation in configuration.operations[priority]:
    eval("self."+operation.get('type') + "(operation)")

voila, c’est tout.

Categories: Uncategorized Tags: , , ,

use an xml file as a python dictionary

23 May 2008 Ivo Leave a comment

well, I wanted something like this, to manage a configuration file.

I have done this today, in python. It seems to work with ElementTree and lxml.

It’s available on the assembla SVN, I’ll probably search a way to publish it elsewhere on the net, too.

I don’t think it’s complete, but it’s a beginning. It’s also full of things to fix, handle in a better way, and so on.

regular expression for a fax number

20 May 2008 Ivo Leave a comment

pas vraiment optimisé, mais c’est un début.

(Tel.*?|Fax.*?)[\ \/\(\)\.\+0-9\-]{7,20}
Categories: Uncategorized Tags: , ,

why are you seeing only this post?

19 May 2008 Ivo Leave a comment

well, this is a mainly private blog. you will see only a few posts, like really important solutions, which are not related to the enterprise where I work.

if you really want to see what is going underground, write me.

Categories: Uncategorized

Hello world!

16 May 2008 Ivo 1 comment

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Categories: Uncategorized