Today I did some cleaning up regarding our Leonov Software Infrastructure.

First of all, I removed all those *censored* spammers from the userdatabase, and upgraded the wiki from moin 1.7.1 from Intrepid to 1.8.4 (Moin Upstream, new package backport). Second, I added OpenID RP support and BotBouncer login support..now if you already had a (normal) account, please login with your openid and associate yourself with your old wiki username. All new people need to login can create their wiki login after they are authenticated via openID.

I hope, we can get rid of the wiki spammers.

Other Leonov News?

What do you think about that:

Contens of config.ini:

[section1]
var1=value1
var2=value2

[section2]
var3=True
var4=off

[section3]
var5=42
var6=Nice isn't it?
shermann@home:~ leonov/Leonov/ > python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from backend.configuration import Config
>>> cfg=Config.from_file()
>>> print cfg.sections()
['section3', 'section2', 'section1']
>>> print cfg.items("section1")
[('var1', 'value1'), ('var2', 'value2')]

Seeing this is no surprise…Pythons SafeConfigParser is doing that all for you. But what about that?

>>> cfg.new_section.see="WTF?"
>>> cfg.new_section.see_again="On"
>>> cfg.no_wayout_section.halt=True
>>> cfg.no_wayout_section.numbers=666

"Hmmm? This won’t work with SafeConfigParser!!!", you say…You are absolutely right, it won’t but,

>>> print cfg.sections()
['new_section', 'no_wayout_section', 'section3', 'section2', 'section1']
>>> print cfg.items("no_wayout_section")
[('halt', 'True'), ('numbers', '666')]

Somehow it worked.

Let’s see the file:

[new_section]
see_again = On
see = WTF?

[no_wayout_section]
halt = True
numbers = 666

[section3]
var5 = 42
var6 = Nice isn't it?

[section2]
var3 = True
var4 = off

[section1]
var1 = value1
var2 = value2

What does that mean?

Markus Korn and I are working on Leonov.

Markus was so kind, and brought my idea in better python code then my brain could ever produce. Actually the above example is the new way to use our configuration space in Leonov. The idea came to me while reading PyGTK Changelogs. As you know, the old way of applying properties to Widgets is to call set-property or get-property. Since PyGTK 2.x.y the PyGTK Maintainers decided to make it more pythonic, and now you can get and set gtk widget properties a la "widget.props.<propertyname>". I thought it could help us too.

Interessted in adapting or reusing the code? Give us a bit more time to push it to Launchpad…you’ll get the news :)