<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>blog entries (Logilab.org) RSS Feed</title>
    <description></description>
    <link>http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD</link>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/38495</guid>
  <title>Discovering logilab-common Part 1 - deprecation module</title>
  <link>http://www.logilab.org/blogentry/38495</link>
  <description>&lt;p&gt;&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;logilab-common&lt;/span&gt;&lt;/tt&gt; library contains a lot of utilities which are
often unknown. I will write a series of blog entries to
explore nice features of this library.&lt;/p&gt;
&lt;p&gt;We will begin with the &lt;tt class=&quot;docutils literal&quot;&gt;logilab.common.deprecation&lt;/tt&gt; module which contains utilities to warn users when:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;a function or a method is deprecated&lt;/li&gt;
&lt;li&gt;a class has been moved into another module&lt;/li&gt;
&lt;li&gt;a class has been renamed&lt;/li&gt;
&lt;li&gt;a callable has been moved to a new module&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;section&quot; id=&quot;deprecated&quot;&gt;
&lt;h3&gt;&lt;a&gt;deprecated&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When a function or a method is deprecated, you can use the
&lt;tt class=&quot;docutils literal&quot;&gt;deprecated&lt;/tt&gt; decorator. It will print a message to warn the user
that the function is deprecated.&lt;/p&gt;
&lt;p&gt;The decorator takes two optional arguments:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;reason&lt;/tt&gt;: the deprecation message. A good practice is to specify
at the beginning of the message, between brackets, the version
number from which the function is deprecated. The default message
is &#39;The function &amp;quot;[function name]&amp;quot; is deprecated&#39;.&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;stacklevel&lt;/tt&gt;: This is the option of the &lt;cite&gt;warnings.warn&lt;/cite&gt; function which is used by the decorator. The default value is 2.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;We have a class Person defined in a file &lt;cite&gt;person.py&lt;/cite&gt;. The
&lt;cite&gt;get_surname&lt;/cite&gt; method is deprecated, we must use the &lt;cite&gt;get_lastname&lt;/cite&gt;
method instead. For that, we use the &lt;tt class=&quot;docutils literal&quot;&gt;deprecated&lt;/tt&gt; decorator on the
&lt;cite&gt;get_surname&lt;/cite&gt; method.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logilab.common.deprecation&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;deprecated&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;firstname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lastname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_firstname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;firstname&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_lastname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lastname&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get_firstname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_firstname&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get_lastname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_lastname&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@deprecated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;[1.2] use get_lastname instead&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get_surname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_lastname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create_user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;firstname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lastname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;firstname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lastname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;create_user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Paul&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Smith&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;surname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_surname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When running &lt;cite&gt;person.py&lt;/cite&gt; we have the message below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;person.py:22: DeprecationWarning: [1.2] use get_lastname instead&lt;/dt&gt;
&lt;dd&gt;surname = person.get_surname()&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;class-moved&quot;&gt;
&lt;h3&gt;&lt;a&gt;class_moved&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Now we moved the class &lt;cite&gt;Person&lt;/cite&gt; in a &lt;cite&gt;new_person.py&lt;/cite&gt; file. We notice
in the &lt;cite&gt;person.py&lt;/cite&gt; file that the class has been moved:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logilab.common.deprecation&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;class_moved&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;new_person&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;class_moved&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Paul&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Smith&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When we run the &lt;cite&gt;person.py&lt;/cite&gt; file, we have the following message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;person.py:6: DeprecationWarning: class Person is now available as new_person.Person&lt;/dt&gt;
&lt;dd&gt;person = Person(&#39;Paul&#39;, &#39;Smith&#39;)&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;p&gt;The &lt;cite&gt;class_moved&lt;/cite&gt; function takes one mandatory argument and two optional:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;new_class&lt;/tt&gt;: this mandatory argument is the new class&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;old_name&lt;/tt&gt;: this optional argument specify the old class
name. By default it is the same name than the new class. This
argument is used in the default printed message.&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;message&lt;/tt&gt;: with this optional argument, you can specify a custom message&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;class-renamed&quot;&gt;
&lt;h3&gt;&lt;a&gt;class_renamed&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;class_renamed&lt;/tt&gt; function automatically creates a class which
fires a DeprecationWarning when instantiated.&lt;/p&gt;
&lt;p&gt;The function takes two mandatory arguments and one optional:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;old_name&lt;/tt&gt;: a string which contains the old class name&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;new_class&lt;/tt&gt;: the new class&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;message&lt;/tt&gt;: an optional message. The default one is &#39;[old class name] is deprecated, use [new class name]&#39;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;We now rename the &lt;cite&gt;Person&lt;/cite&gt; class into &lt;cite&gt;User&lt;/cite&gt; class in the
&lt;tt class=&quot;docutils literal&quot;&gt;new_person.py&lt;/tt&gt; file. Here is the new &lt;cite&gt;person.py&lt;/cite&gt; file:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logilab.common.deprecation&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;class_renamed&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;new_person&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;User&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;Person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;class_renamed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Person&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Paul&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Smith&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When running &lt;cite&gt;person.py&lt;/cite&gt;, we have the following message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;person.py:5: DeprecationWarning: Person is deprecated, use User&lt;/dt&gt;
&lt;dd&gt;person = Person(&#39;Paul&#39;, &#39;Smith&#39;)&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;moved&quot;&gt;
&lt;h3&gt;&lt;a&gt;moved&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;moved&lt;/tt&gt; function is used to tell that a callable has been moved
to a new module. It returns a callable wrapper, so that when the wrapper is
called, a warning is printed telling where the object can be found. Then the
import is done (and not before) and the actual object is called.&lt;/p&gt;
&lt;div class=&quot;note&quot;&gt;
&lt;h3 class=&quot;first&quot;&gt;&lt;a&gt;Note&lt;/a&gt;&lt;/h3&gt;
&lt;p class=&quot;last&quot;&gt;The usage is somewhat limited on classes since it will fail if the
wrapper is used in a class ancestors list: use the &lt;tt class=&quot;docutils literal&quot;&gt;class_moved&lt;/tt&gt; function
instead (which has no lazy import feature though).&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;moved&lt;/tt&gt; function takes two mandatory parameters:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;modpath&lt;/tt&gt;: a string representing the path to the new module&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;objname&lt;/tt&gt;: the name of the new callable&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;We will use in &lt;cite&gt;person.py&lt;/cite&gt;, the &lt;cite&gt;create_user&lt;/cite&gt; function which is now
defined in the &lt;cite&gt;new_person.py&lt;/cite&gt; file:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logilab.common.deprecation&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;moved&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;create_user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;moved&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;new_person&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;create_user&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;create_user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Paul&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Smith&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When running &lt;cite&gt;person.py&lt;/cite&gt;, we have the following message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;person.py:4: DeprecationWarning: object create_user has been moved to module new_person&lt;/dt&gt;
&lt;dd&gt;person = create_user(&#39;Paul&#39;, &#39;Smith&#39;)&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-09-02T12:42-01:00</dc:date>
  <dc:creator>Stéphanie Marcu</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/37709</guid>
  <title>pdb.set_trace no longer working: problem solved</title>
  <link>http://www.logilab.org/blogentry/37709</link>
  <description>&lt;p&gt;I had a bad case of bug hunting today which took me &amp;gt; 5 hours to track down (with the help of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/adimascio&quot;&gt;Adrien&lt;/a&gt; in the end).&lt;/p&gt;
&lt;p&gt;I was trying to start a &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; instance on my computer, and was encountering some strange &lt;a class=&quot;reference&quot; href=&quot;http://www.xs4all.nl/~irmen/pyro3/&quot;&gt;pyro&lt;/a&gt; error at startup. So I edited some source file to add a &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/release/2.6/library/pdb.html#pdb.set_trace&quot;&gt;pdb.set_trace()&lt;/a&gt; statement and restarted the instance, waiting for Python&#39;s debugger to kick in. But that did not happen. I was baffled. I first checked for standard problems:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;no pdb.py or pdb.pyc was lying around in my Python sys.path&lt;/li&gt;
&lt;li&gt;the pdb.set_trace function had not been silently redefined&lt;/li&gt;
&lt;li&gt;no other thread was bugging me&lt;/li&gt;
&lt;li&gt;the standard input and output were what they were supposed to be&lt;/li&gt;
&lt;li&gt;I was not able to reproduce the issue on other machines&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After triple checking everything, grepping everywhere, I asked a &lt;a class=&quot;reference&quot; href=&quot;http://stackoverflow.com/questions/3466552/what-can-cause-pdb-set-trace-to-be-ignored&quot;&gt;question&lt;/a&gt; on &lt;a class=&quot;reference&quot; href=&quot;http://stackoverflow.com/&quot;&gt;StackOverflow&lt;/a&gt; before taking a lunch break (if you go there, you&#39;ll see the answer). After lunch, no useful answer had come in, so I asked &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/adimascio&quot;&gt;Adrien&lt;/a&gt; for help, because two pairs of eyes are better than one in some cases. We dutifully traced down the &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/release/2.6/library/pdb.html&quot;&gt;pdb&lt;/a&gt; module&#39;s code to the underlying &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/release/2.6/library/bdb.html&quot;&gt;bdb&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/release/2.6/library/cmd.html&quot;&gt;cmd&lt;/a&gt; modules and learned some interesting things on the way down there. Finally, we found out that the Python code frames which should have been identical where not. This discovery caused further bafflement. We looked at the frames, and saw that one of those frames&#39;s class was a &lt;a class=&quot;reference&quot; href=&quot;http://psyco.sf.net/&quot;&gt;psyco&lt;/a&gt; generated wrapper.&lt;/p&gt;
&lt;p&gt;It turned out that &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; can use two implementation of the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/rql&quot;&gt;RQL&lt;/a&gt; module: one which uses &lt;a class=&quot;reference&quot; href=&quot;http://www.gecode.org/&quot;&gt;gecode&lt;/a&gt; (a C++ library for constraint based programming) and one which uses &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-constraint&quot;&gt;logilab.constraint&lt;/a&gt; (a pure python library for constraint solving). The former is the default, but it would not load on my computer, because the gecode library had been replaced by a more recent version during an upgrade. The pure python implementation tries to use psyco to speed up things. Installing the correct version of libgecode solved the issue. End of story.&lt;/p&gt;
&lt;p&gt;When I checked out StackOverflow, Ned Batchelder had provided an answer. I didn&#39;t get the satisfaction of answering the question myself...&lt;/p&gt;
&lt;p&gt;Once this was figured out, solving the initial &lt;a class=&quot;reference&quot; href=&quot;http://www.xs4all.nl/~irmen/pyro3/&quot;&gt;pyro&lt;/a&gt; issue took 2 minutes...&lt;/p&gt;
</description>
  <dc:date>2010-08-12T16:17-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/36994</guid>
  <title>EuroSciPy&#39;10</title>
  <link>http://www.logilab.org/blogentry/36994</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9852?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9852?vid=download&quot; /&gt;
&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/conference/euroscipy2010&quot;&gt;EuroSciPy2010&lt;/a&gt; conference was held in Paris at the Ecole Normale Supérieure
from July 8th to 11th and was organized and sponsored by Logilab and other
companies.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;july-8-9-tutorials&quot;&gt;
&lt;h3&gt;&lt;a&gt;July, 8-9: Tutorials&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The first two days were dedicated to tutorials and I had the chance to talk
about &lt;a class=&quot;reference&quot; href=&quot;http://www.scipy.org/&quot;&gt;SciPy&lt;/a&gt; with André Espaze, Gaël Varoquaux and Emanuelle Gouillart in the
introductory track. This was nice but it was a bit tricky to present SciPy in
such a short time while trying to illustrate the material with real and
interesting examples. One very nice thing for the introductory track is that all
the material was contributed by different speakers and is freely
available in a &lt;a class=&quot;reference&quot; href=&quot;http://github.com/emmanuelle/Euroscipy-intro-tutorials&quot;&gt;github repository&lt;/a&gt; (licensed under CC BY).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;july-10-11-scientific-track&quot;&gt;
&lt;h3&gt;&lt;a&gt;July, 10-11: Scientific track&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The next two days were dedicated to scientific presentations and why python is
such a great tool to develop scientific software and carry out research.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;keynotes&quot;&gt;
&lt;h4&gt;&lt;a&gt;Keynotes&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;I had a very great time listening to the presentations&lt;/strong&gt;, starting with the two very nice keynotes given by &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/talk/876&quot;&gt;Hans Petter Langtangen&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/talk/2011&quot;&gt;Konrad Hinsen&lt;/a&gt;. The latter gave us a very nice summary of what happened in the scientific python world during the past 15 years, what is happening now and of course what could happen during the next 15 years. Using a crystal ball and a very humorous tone, he made it very clear that &lt;strong&gt;the challenge in the next years will be about how using our hundreds, thousands or even more cores in a bug-free and efficient way&lt;/strong&gt;. Functional programming may be a very good solution to this challenge as it provides a deterministic way of parallelizing our programs. Konrad also provided some hints about future versions of python that could provide a deeper and more efficient support of functional programming and maybe the addition of a keyword &#39;async&#39; to handle the computation of a function in another core.&lt;/p&gt;
&lt;p&gt;In fact, the &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/dev/peps/pep-3148&quot;&gt;PEP 3148&lt;/a&gt; entitled &amp;quot;Futures - execute computations asynchronously&amp;quot; was just accepted two days ago. This PEP describes the new package called &amp;quot;futures&amp;quot; designed to facilitate the evaluation of callables using threads and processes in future versions of python. A &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/pythonfutures&quot;&gt;full implementation&lt;/a&gt; is already available.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;parallelization&quot;&gt;
&lt;h4&gt;&lt;a&gt;Parallelization&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Parallelization was indeed a very popular issue across presentations, and as for resolving &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Embarrassingly_parallel&quot;&gt;embarrassingly parallel&lt;/a&gt; problems, several solutions were presented.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;&lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/playdoh&quot;&gt;Playdoh&lt;/a&gt;: Distributes computations over computers connected to a secure network (see &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/talk/2009&quot;&gt;playdoh presentation&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Distributing the computation of a function over two machines is as simple as:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;playdoh&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;result1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;playdoh&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fun&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arg2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_machines&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;machine1.network.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;machine2.network.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;&lt;a class=&quot;reference&quot; href=&quot;http://deeplearning.net/software/theano&quot;&gt;Theano&lt;/a&gt;: Allows to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. In particular it can use GPU transparently and generate optimized C code (see &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/talk/1666&quot;&gt;theano presentation&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;&lt;a class=&quot;reference&quot; href=&quot;http://packages.python.org/joblib&quot;&gt;joblib&lt;/a&gt;: Provides among other things helpers for embarrassingly parallel problems. It&#39;s built over the &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/multiprocessing.html&quot;&gt;multiprocessing package&lt;/a&gt; introduced in python 2.6 and brings more readable code and easier debugging.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;speed&quot;&gt;
&lt;h4&gt;&lt;a&gt;Speed&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Concerning speed, Fransesc Alted has showed us interesting tools for memory optimization currently successfully used in &lt;a class=&quot;reference&quot; href=&quot;http://www.pytables.org&quot;&gt;PyTables&lt;/a&gt; 2.2. You can read more details on these kind of optimizations in &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/9853&quot;&gt;EuroSciPy&#39;09 (part 1/2): The Need For Speed&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;scons&quot;&gt;
&lt;h4&gt;&lt;a&gt;SCons&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Last but not least, I talked with Cristophe Pradal who is one of the core developer of &lt;a class=&quot;reference&quot; href=&quot;http://openalea.gforge.inria.fr&quot;&gt;OpenAlea&lt;/a&gt;. He convinced me that &lt;a class=&quot;reference&quot; href=&quot;http://www.scons.org&quot;&gt;SCons&lt;/a&gt; is worth using once you have built a &lt;strong&gt;nice extension for it&lt;/strong&gt;: &lt;a class=&quot;reference&quot; href=&quot;http://openalea.gforge.inria.fr/wiki/doku.php?id=packages:compilation_installation:sconsx:sconsx&quot;&gt;SConsX&lt;/a&gt;. I&#39;m looking forward to testing it.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-07-13T14:12-01:00</dc:date>
  <dc:creator>Adrien Chauve</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/35883</guid>
  <title>HOWTO install lodgeit pastebin under Debian/Ubuntu</title>
  <link>http://www.logilab.org/blogentry/35883</link>
  <description>&lt;p&gt;Lodge it is a simple open source pastebin... and it&#39;s written in Python!&lt;/p&gt;
&lt;p&gt;The installation under debian/ubuntu goes as follows:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;sudo apt-get update
sudo apt-get -uVf install python-imaging python-sqlalchemy python-jinja2 python-pybabel python-werkzeug python-simplejson
&lt;span class=&quot;nb&quot;&gt;cd local&lt;/span&gt;
hg clone http://dev.pocoo.org/hg/lodgeit-main
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;lodgeit-main
vim manage.py
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For debian squeeze you have to downgrade python-werkzeug, so get the
old version of python-werkzeug from snapshot.debian.org at
&lt;a class=&quot;reference&quot; href=&quot;http://snapshot.debian.org/package/python-werkzeug/0.5.1-1/&quot;&gt;http://snapshot.debian.org/package/python-werkzeug/0.5.1-1/&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;wget http://snapshot.debian.org/archive/debian/20090808T041155Z/pool/main/p/python-werkzeug/python-werkzeug_0.5.1-1_all.deb
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Modify the dburi and the SECRET_KEY. And launch application:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;python manage.py runserver
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then off you go configure your apache or lighthttpd.&lt;/p&gt;
&lt;p&gt;An easy (and dirty) way of running it at startup is to add the
following command to the www-data crontab&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;#64;reboot cd /tmp/; nohup /usr/bin/python /usr/local/lodgeit-main/manage.py runserver &amp;amp;
&lt;/pre&gt;
&lt;p&gt;This should of course be done in an init script.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://rn0.ru/static/help/advanced_features.png&quot; class=&quot;align-center&quot; src=&quot;http://rn0.ru/static/help/advanced_features.png&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Hopefully we&#39;ll find some time to package this nice webapp for
debian/ubuntu.&lt;/p&gt;
</description>
  <dc:date>2010-06-24T16:46-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/33845</guid>
  <title>EuroSciPy 2010 schedule is out !</title>
  <link>http://www.logilab.org/blogentry/33845</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;https://www.euroscipy.org/data/logo.png&quot; class=&quot;align-right&quot; src=&quot;https://www.euroscipy.org/data/logo.png&quot; /&gt;
&lt;p&gt;The EuroSciPy 2010 conference will be held in Paris from july 8th to 11th at Ecole Normale Supérieure. Two days of tutorials, two days of conference, two interesting keynotes, a lightning talk session, an open space for collaboration and sprinting, thirty quality talks in the &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/conference/euroscipy2010?tab=talksschedule&quot;&gt;schedule&lt;/a&gt; and already 100 delegates registered.&lt;/p&gt;
&lt;p&gt;If you are doing science and using Python, you want to be there!&lt;/p&gt;
</description>
  <dc:date>2010-06-06T19:12-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/33637</guid>
  <title>Salomé accepted into Debian unstable</title>
  <link>http://www.logilab.org/blogentry/33637</link>
  <description>&lt;p&gt;Salomé is a platform for pre and post-processing of numerical simulation
available at &lt;a class=&quot;reference&quot; href=&quot;http://salome-platform.org/&quot;&gt;http://salome-platform.org/&lt;/a&gt;. It is now available as a Debian package
&lt;a class=&quot;reference&quot; href=&quot;http://packages.debian.org/source/sid/salome&quot;&gt;http://packages.debian.org/source/sid/salome&lt;/a&gt; and should soon appear in Ubuntu &lt;a class=&quot;reference&quot; href=&quot;https://launchpad.net/ubuntu/+source/salome&quot;&gt;https://launchpad.net/ubuntu/+source/salome&lt;/a&gt; as well.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://salome-platform.org/salome_screens.png/image_preview&quot; class=&quot;align-right&quot; src=&quot;http://salome-platform.org/salome_screens.png/image_preview&quot; /&gt;
&lt;div class=&quot;section&quot; id=&quot;a-difficult-packaging-work&quot;&gt;
&lt;h3&gt;&lt;a&gt;A difficult packaging work&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A first package of Salomé 3 was made by the courageous Debian developper
&lt;a class=&quot;reference&quot; href=&quot;http://www.opennovation.com/apowell/&quot;&gt;Adam C. Powell, IV&lt;/a&gt; on January 2008.
Such packaging is very resources intensive because of the building of
many modules. But the most difficult part was to bring Salomé to an
unported environment. Even today, &lt;a class=&quot;reference&quot; href=&quot;http://www.salome-platform.org/downloads/salome-v5.1.3&quot;&gt;Salomé 5 binaries&lt;/a&gt; are only provided
by upstream as a stand-alone piece of software ready to unpack on a Debian Sarge/Etch or a Mandriva 2006/2008.
This is the first reason why several patches
were required for adapting the code to new versions of the dependencies.
The version 3 of Salomé was so difficult and time consuming to package
that Adam decided to stop during two years.&lt;/p&gt;
&lt;p&gt;The packaging of Salomé
started back with the version 5.1.3 in January 2010. Thanks to &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr&quot;&gt;Logilab&lt;/a&gt;
and the OpenHPC project, I could join him during 14 weeks of work for
adapting every module to Debian unstable. Porting to the new versions
of the dependencies was a first step, but we had also to adapt the code to the Debian
packaging philosophy with binaries, librairies and data shipped to
dedicated directories.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;a-promising-future&quot;&gt;
&lt;h3&gt;&lt;a&gt;A promising future&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Salomé being accepted to Debian unstable means that porting it to
Ubuntu should follow in a near future. Moreover the work done for
adapting Salomé to a GNU/Linux distribution may help developpers on
others platforms as well.&lt;/p&gt;
&lt;p&gt;That is excellent news for all people involved in numerical simulation
because they are going to have access to Salomé services by using their
packages management tools. It will help the spreading of Salomé code
on any fresh install and moreover keep it up to date.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;join-the-fun&quot;&gt;
&lt;h3&gt;&lt;a&gt;Join the fun&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For mechanical engineers, a derived product called &lt;a class=&quot;reference&quot; href=&quot;http://www.code-aster.org/V2/spip.php?article295&quot;&gt;Salomé-Méca&lt;/a&gt;
has recently been published.
The goal is to bring the functionalities from the &lt;a class=&quot;reference&quot; href=&quot;http://www.code-aster.org/&quot;&gt;Code Aster&lt;/a&gt; finite
element solver to Salomé in order to ease simulation workflows. If you
are as well interested in Debian packages for those tools, you are
invited to come with us and join the fun.&lt;/p&gt;
&lt;p&gt;I have submitted a proposal to talk about Salomé at &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/conference/euroscipy2010&quot;&gt;EuroSciPy 2010&lt;/a&gt;. I look
forward to meet other interested parties during this conference that
will take place in Paris on July 8th-11th.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-06-03T18:28-01:00</dc:date>
  <dc:creator>Andre Espaze</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/32522</guid>
  <title>Une mise en place de l’eXtreme Programming - ce que j&#39;en retiens</title>
  <link>http://www.logilab.org/blogentry/32522</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://rubyonrails.org/images/rails.png&quot; class=&quot;align-right&quot; src=&quot;http://rubyonrails.org/images/rails.png&quot; /&gt;
&lt;p&gt;Je suis allé à la présentation de &amp;quot;Une mise en place de l’eXtreme Programming&amp;quot; présenté par &lt;a class=&quot;reference&quot; href=&quot;http://www.karinesabatier.net/&quot;&gt;Karine Sabatier&lt;/a&gt; dans le cadre d&#39;&lt;a class=&quot;reference&quot; href=&quot;http://www.agilenantes.org/&quot;&gt;Agile Nantes&lt;/a&gt;. On y a parlé plutôt &lt;a class=&quot;reference&quot; href=&quot;http://rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt; que python, mais surtout de méthodes agiles et XP.&lt;/p&gt;
&lt;p&gt;Voici quelques points que j&#39;ai retenu de cette présentation tout à fait pragmatique d&#39;une mise en pratique des principes XP :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Le principe de &amp;quot;Convention over configuration&amp;quot; : préférer la convention (notamment pour la programmation) plutôt que la contrainte par la configuration. Dans Ruby On Rails, les conventions sont très fortes, pour faire une application on ne peut pas s&#39;éloigner du modèle MVC : les modèles sont dans &amp;quot;model&amp;quot;, les views sont dans &amp;quot;views&amp;quot; etc... À ce sujet, la conférencière a fait référence à deux types de designs que je ne connaissait pas : le DDD &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Domain-driven_design&quot;&gt;Domain-driven Design&lt;/a&gt; et &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Behavior_Driven_Development&quot;&gt;Behavior Driven Development&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Utilisation de métaphores : trouver un langage commun avec le client mais aussi avec les utilisateurs&lt;/li&gt;
&lt;li&gt;Application de déploiement ruby on rails : &lt;a class=&quot;reference&quot; href=&quot;http://www.capify.org/index.php/Capistrano&quot;&gt;Capistrano&lt;/a&gt;, bien qu&#39;à Logilab nous privilégions le déploiement par paquets et dépôts debian, en python on pourra jeter un coup d&#39;œil à &lt;a class=&quot;reference&quot; href=&quot;http://docs.fabfile.org/0.9.0/&quot;&gt;Fabric&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://retrospectiva.org/extensions/overview/images/product_backlog.png?1265550417&quot; class=&quot;align-right&quot; src=&quot;http://retrospectiva.org/extensions/overview/images/product_backlog.png?1265550417&quot; /&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Leur projet XP utilisait le logiciel de gestion de projet &lt;a class=&quot;reference&quot; href=&quot;http://retrospectiva.org/overview&quot;&gt;Retrospectiva&lt;/a&gt;. Celui-ci ressemble sur bien des points à &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/jpl&quot;&gt;JPL&lt;/a&gt; (Jeux de Planification Logiciel) disponible sur le framework CubicWeb (&lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;http://www.cubicweb.org&lt;/a&gt;). Coté intégration continue : &lt;a class=&quot;reference&quot; href=&quot;http://cruisecontrol.sourceforge.net/&quot;&gt;CruiseControl&lt;/a&gt; , en python nous privilégions &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot&quot;&gt;apycot&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Ce projet a essayé l&#39;utilisation de &lt;a class=&quot;reference&quot; href=&quot;http://seleniumhq.org/&quot;&gt;Selenium&lt;/a&gt; pour ces tests web. Le constat est le même que chez Logilab : la première fois que ca marche c&#39;est utile et apporte une grande satisfaction, dans un deuxième temps ca reste très difficile à maintenir. Nous regardons à présent plutôt du coté de &lt;a class=&quot;reference&quot; href=&quot;http://www.getwindmill.com/&quot;&gt;Windmill&lt;/a&gt; qui a été intégré à la version &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb/3.9.0&quot;&gt;3.9 de cubicweb&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Une mention a été fait d&#39;une société fonctionnement uniquement en mode agile &lt;a class=&quot;reference&quot; href=&quot;http://pyxis-tech.com/&quot;&gt;Pyxis&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
</description>
  <dc:date>2010-05-20T12:19-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/29155</guid>
  <title>Enable and disable encrypted swap - Ubuntu</title>
  <link>http://www.logilab.org/blogentry/29155</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://ubuntu-party.org/wp-content/themes/ubuntu-party/scripts/timthumb.php?src=//wp-content/uploads/2010/04/evl-pochette21.png&amp;amp;w=210&amp;amp;h=192&amp;amp;zc=1&amp;amp;q=100&quot; class=&quot;align-left&quot; src=&quot;http://ubuntu-party.org/wp-content/themes/ubuntu-party/scripts/timthumb.php?src=//wp-content/uploads/2010/04/evl-pochette21.png&amp;amp;w=210&amp;amp;h=192&amp;amp;zc=1&amp;amp;q=100&quot; /&gt;
&lt;p&gt;With the release of &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com/products/whatisubuntu/1004features&quot;&gt;Lucid&lt;/a&gt; Lynx, the use of an encrypted /home is becoming a pretty common and simple to setup thing. This is good news for privacy reasons obviously. The next step which a lot of users are reluctant to accomplish is the use of an encrypted swap. One of the most obvious reasons is that in most cases it breaks the suspend and hibernate functions.&lt;/p&gt;
&lt;p&gt;Here is a little HOWTO on how to switch from normal swap to encrypted swap and back. That way, when you need a secure laptop (trip to a conference, or situtation with risk of theft) you can active it, and then deactivate it when you&#39;re at home for example.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;turn-it-on&quot;&gt;
&lt;h3&gt;&lt;a&gt;Turn it on&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;That is pretty simple&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
sudo ecryptfs-setup-swap
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;turn-it-off&quot;&gt;
&lt;h3&gt;&lt;a&gt;Turn it off&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;right&quot; alt=&quot;https://launchpadlibrarian.net/17699584/ecryptfs_64.png&quot; class=&quot;align-right&quot; src=&quot;https://launchpadlibrarian.net/17699584/ecryptfs_64.png&quot; /&gt;
&lt;p&gt;The idea is to turn off swap, remove the ecryptfs layer, reformat your partition with normal swap and enable it. We use sda5 as an example for the swap partition, please use your own (&lt;cite&gt;fdisk -l&lt;/cite&gt; will tell you which swap partition you are using - or in /etc/crypttab)&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
sudo swapoff -a
sudo cryptsetup remove /dev/mapper/cryptswap1
sudo vim /etc/crypttab
*remove the /dev/sda5 line*
sudo /sbin/mkswap /dev/sda5
sudo swapon /dev/sda5
sudo vim /etc/fstab
*replace /dev/mapper/cryptswap1 with /dev/sda5*
&lt;/pre&gt;
&lt;p&gt;If this is is useful, you can probably stick it in a script to turn on and off... maybe we could get an ecryptfs-unsetup-swap into &lt;a class=&quot;reference&quot; href=&quot;http://ecryptfs.sf.net/&quot;&gt;ecryptfs&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-05-18T16:31-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/29038</guid>
  <title>The DEBSIGN_KEYID trick</title>
  <link>http://www.logilab.org/blogentry/29038</link>
  <description>&lt;p&gt;I have been wondering for some time why debsign would not use the DEBSIGN_KEYID environment variable that I exported from my bashrc. Debian &lt;a class=&quot;reference&quot; href=&quot;http://bugs.debian.org/444641&quot;&gt;bug 444641&lt;/a&gt; explains the trick: debsign ignores environment variables and sources ~/.devscripts instead. A simple &lt;cite&gt;export DEBSIGN_KEYID=ABCDEFG&lt;/cite&gt; in ~/.devscripts is enough to get rid of the -k argument once and for good.&lt;/p&gt;
</description>
  <dc:date>2010-05-12T18:23-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/24354</guid>
  <title>Sprint CubicWeb chez Logilab - annonce de dernière minute</title>
  <link>http://www.logilab.org/blogentry/24354</link>
  <description>&lt;p&gt;Logilab est en ce moment en train d&#39;acceuillir un &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Sprint_%28software_development%29&quot;&gt;sprint&lt;/a&gt; autour de la plateforme &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt;. L&#39;objectif principal de ce sprint de 5 jours est d&#39;améliorer l&#39;usage de javascript et des css dans CubicWeb :&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/28586?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/28586?vid=download&quot; /&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://codesnip.net/wp-content/uploads/javascript.png&quot; class=&quot;align-right&quot; src=&quot;http://codesnip.net/wp-content/uploads/javascript.png&quot; /&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;avoir une API javascript propre, testée et documentée&lt;/li&gt;
&lt;li&gt;pouvoir facilement changer le style d&#39;une application cubicweb&lt;/li&gt;
&lt;li&gt;gestion de bundle pour javascript et CSS&lt;/li&gt;
&lt;li&gt;une documentation sur les standards d&#39;écriture des fichiers JS et CSS pour cubicweb&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ce sprint aura lieu du jeudi 29 avril 2010 au 5 mai 2010 (weekend exlus - les bureaux seront fermés). Vous êtes les bienvenus pour contribuer, filer un coup de main, faire du pair programming... ou simplement rencontrer des développeurs cubicweb. Vous pouvez même venir une après-midi ou une seule journée. Pour ceux avec des portables, il y aura du réseau disponible pour être connecté.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adresse&lt;/strong&gt; : 104 Boulevard Auguste-Blanqui, Paris. Sonnez à &amp;quot;Logilab&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Métro&lt;/strong&gt; : St Jacques or Corvisart (Glacière est la station la plus proche mais sera fermée à partir de lundi)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contact&lt;/strong&gt; : &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr/contact&quot;&gt;http://www.logilab.fr/contact&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dates&lt;/strong&gt; : du 29/04/2010 au 30/04/2010 et du 03/05/2010 au 05/05/2010&lt;/p&gt;
</description>
  <dc:date>2010-04-29T18:50-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/23434</guid>
  <title>pylint bug days #2 report</title>
  <link>http://www.logilab.org/blogentry/23434</link>
  <description>&lt;p&gt;First of all, I&#39;ve to say that pylint bugs day wasn&#39;t that successful in term of &#39;community event&#39;: I&#39;ve been sprinting almost alone. My Logilab&#39;s felows were tied to customer projects, and no outside people shown up on jabber. Fortunatly Tarek Ziade came to visit us, and that was a nice opportunity to talk about pylint, distribute, etc ... Thank you Tarek, you saved my day ;)&lt;/p&gt;
&lt;p&gt;As I felt a bit alone, I decided to work on somethings funnier than bug fixing: refactoring!&lt;/p&gt;
&lt;p&gt;First, I&#39;ve greatly simplified the command line: &lt;cite&gt;enable-msg/enable-msg-cat/enable-checker/enable-report&lt;/cite&gt; and their &lt;cite&gt;disable-*&lt;/cite&gt; counterparts were all merged into single &lt;cite&gt;--enable/--disable&lt;/cite&gt; options.&lt;/p&gt;
&lt;p&gt;I&#39;ve also simplified &amp;quot;pylint --help&amp;quot; output, providing a &lt;cite&gt;--long-help option to get what we had before. Generic support in `logilab.common.configuration&lt;/cite&gt; of course.&lt;/p&gt;
&lt;p&gt;And last but not least, I refactored pylint so we can have multiple checkers with the same name. The idea behind this is that we can split checker into smaller chunks, basically
only responsible for one or a few related messages. When pylint runs, it only uses necessary checkers according to activated messages and reports. When all checkers will be splitted, it should improve performance of &amp;quot;pylint --error-only&amp;quot;.&lt;/p&gt;
&lt;p&gt;So, I can say I&#39;m finally happy with the results of that pylint bugs day! And hopefuly we will be more people for the next edition...&lt;/p&gt;
</description>
  <dc:date>2010-04-19T17:12-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/22498</guid>
  <title>Virtualenv - Play safely with a Python</title>
  <link>http://www.logilab.org/blogentry/22498</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://farm5.static.flickr.com/4031/4255910934_80090f65d7.jpg&quot; class=&quot;align-right&quot; src=&quot;http://farm5.static.flickr.com/4031/4255910934_80090f65d7.jpg&quot; style=&quot;height: 200px;&quot; /&gt;
&lt;div class=&quot;contents topic&quot; id=&quot;plan&quot;&gt;
&lt;p class=&quot;topic-title&quot;&gt;Plan&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#abstract&quot; id=&quot;id1&quot;&gt;Abstract&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#install-and-usage&quot; id=&quot;id2&quot;&gt;Install and usage&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#install&quot; id=&quot;id3&quot;&gt;Install&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#quick-guide&quot; id=&quot;id4&quot;&gt;Quick Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#what-does-virtualenv-actually-do&quot; id=&quot;id5&quot;&gt;What does &lt;tt class=&quot;docutils literal&quot;&gt;virtualenv&lt;/tt&gt; actually do ?&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#at-creation-time&quot; id=&quot;id6&quot;&gt;At creation time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#at-activation-time&quot; id=&quot;id7&quot;&gt;At activation time&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#installing-package&quot; id=&quot;id8&quot;&gt;Installing package&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#useful-options&quot; id=&quot;id9&quot;&gt;Useful options&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#improve-isolation&quot; id=&quot;id10&quot;&gt;Improve isolation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#work-with-different-versions-of-python&quot; id=&quot;id11&quot;&gt;Work with different versions of Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#distribute-a-sandbox&quot; id=&quot;id12&quot;&gt;Distribute a sandbox&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#tips&quot; id=&quot;id13&quot;&gt;Tips&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#speed-up-sandbox-manipulation&quot; id=&quot;id14&quot;&gt;Speed up sandbox manipulation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#conclusion&quot; id=&quot;id15&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#other-documentation-and-links&quot; id=&quot;id16&quot;&gt;Other Documentation and Links&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv&quot;&gt;virtualenv&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#pip&quot;&gt;pip&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#distribute&quot;&gt;Distribute&lt;/a&gt; are tree tools that help developers
and packagers. In this short presentation we will see some &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv&quot;&gt;virtualenv&lt;/a&gt;
capabilities.&lt;/p&gt;
&lt;p&gt;Please, keep in mind that all above stuff has been made using :
Debian Lenny, python 2.5 and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv&quot;&gt;virtualenv&lt;/a&gt; 1.4.5.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;abstract&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id1&quot;&gt;Abstract&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv&quot;&gt;virtualenv&lt;/a&gt; builds python sandboxes where it is possible to do
whatever you want as a simple user without putting in jeopardy your global
environment.&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv&quot;&gt;virtualenv&lt;/a&gt; allows you to safety:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;install any python packages&lt;/li&gt;
&lt;li&gt;add debug lines everywhere (not only in your scripts)&lt;/li&gt;
&lt;li&gt;switch between python versions&lt;/li&gt;
&lt;li&gt;try your code as you are a final user&lt;/li&gt;
&lt;li&gt;and so on ...&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;install-and-usage&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id2&quot;&gt;Install and usage&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;install&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id3&quot;&gt;Install&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Prefered way&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just download the virtualenv python script at &lt;a class=&quot;reference&quot; href=&quot;http://bitbucket.org/ianb/virtualenv/raw/tip/virtualenv.py&quot;&gt;http://bitbucket.org/ianb/virtualenv/raw/tip/virtualenv.py&lt;/a&gt; and call it using python (e.g. &lt;tt class=&quot;docutils literal&quot;&gt;python virtualenv.py&lt;/tt&gt;).&lt;/p&gt;
&lt;p&gt;For conveinience, we will refers to this script using &lt;tt class=&quot;docutils literal&quot;&gt;virtualenv&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Other ways&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For Debian (ubuntu as well) addicts, just do :&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ sudo aptitude install python-virtualenv
&lt;/pre&gt;
&lt;p&gt;Fedora users would do:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ sudo yum install python-virtualenv
&lt;/pre&gt;
&lt;p&gt;And others can install from PyPI (as superuser):&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ pip install virtualenv
&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ easy_install pip &amp;amp;&amp;amp; pip install virtualenv
&lt;/pre&gt;
&lt;p&gt;You could also get the source &lt;a class=&quot;reference&quot; href=&quot;http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.4.5.tar.gz#md5=d3c621dd9797789fef78442e336df63e&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;quick-guide&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id4&quot;&gt;Quick Guide&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To work in a python sandbox, do as follow:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ virtualenv my_py_env
$ source my_py_env/bin/activate
(my_py_env)$ python
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&amp;quot;That&#39;s all Folks !&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once you have finished just do:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
(my_py_env)$ deactivate
&lt;/pre&gt;
&lt;p&gt;or quit the tty.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;what-does-virtualenv-actually-do&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id5&quot;&gt;What does &lt;tt class=&quot;docutils literal&quot;&gt;virtualenv&lt;/tt&gt; actually do ?&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;at-creation-time&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id6&quot;&gt;At creation time&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Let&#39;s start again ... more slowly. Consider the following environment:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ pwd
/home/you/some/where
$ ls
&lt;/pre&gt;
&lt;p&gt;Now create a sandbox called &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;my-sandbox&lt;/span&gt;&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ virtualenv my-sandbox
New python executable in &amp;quot;my-sandbox/bin/python&amp;quot;
Installing setuptools............done.
&lt;/pre&gt;
&lt;p&gt;The output said that you have a new python executable and specific
install tools. Your current directory now looks like:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ ls -Cl
my-sandbox/ README
$ tree -L 3 my-sandbox
my-sandbox/
|-- bin
|   |-- activate
|   |-- activate_this.py
|   |-- easy_install
|   |-- easy_install-2.5
|   |-- pip
|   `-- python
|-- include
|   `-- python2.5 -&amp;gt; /usr/include/python2.5
`-- lib
    `-- python2.5
        |-- ...
        |-- orig-prefix.txt
        |-- os.py -&amp;gt; /usr/lib/python2.5/os.py
        |-- re.py -&amp;gt; /usr/lib/python2.5/re.py
        |-- ...
        |-- site-packages
        |   |-- easy-install.pth
        |   |-- pip-0.6.3-py2.5.egg
        |   |-- setuptools-0.6c11-py2.5.egg
        |   `-- setuptools.pth
        |-- ...
&lt;/pre&gt;
&lt;p&gt;In addition to the new python executable and the install tools you
have an whole new python environment containing libraries, a
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;site-packages/&lt;/span&gt;&lt;/tt&gt; (where your packages will be installed), a &lt;tt class=&quot;docutils literal&quot;&gt;bin&lt;/tt&gt;
directory, ...&lt;/p&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;Note:&lt;/dt&gt;
&lt;dd&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv&quot;&gt;virtualenv&lt;/a&gt; does not create every file needed to get a whole new python
environment. It uses links to global environment files instead in
order to save disk space end speed up the sandbox creation.
Therefore, there must already have an active python environment
installed on your system.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;at-activation-time&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id7&quot;&gt;At activation time&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;At this point you have to activate the sandbox in order to use your custom python.
Once activated, python still has access to the global environment but will look at your sandbox first for python&#39;s modules:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ source my-sandbox/bin/activate
(my-sandbox)$ which python
/home/you/some/where/my-sandbox/bin/python
$ echo $PATH
/home/you/some/where/my-sandbox/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
(pyver)$ python -c &#39;import sys;print sys.prefix;&#39;
/home/you/some/where/my-sandbox
(pyver)$ python -c &#39;import sys;print &amp;quot;\n&amp;quot;.join(sys.path)&#39;
/home/you/some/where/my-sandbox/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg
[...]
/home/you/some/where/my-sandbox
/home/you/personal/PYTHONPATH
/home/you/some/where/my-sandbox/lib/python2.5/
[...]
/usr/lib/python2.5
[...]
/home/you/some/where/my-sandbox/lib/python2.5/site-packages
[...]
/usr/local/lib/python2.5/site-packages
/usr/lib/python2.5/site-packages
[...]
&lt;/pre&gt;
&lt;p&gt;First of all, a &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;(my-sandbox)&lt;/span&gt;&lt;/tt&gt; message is automatically added to your
prompt in order to make it clear that you&#39;re using a
python sandbox environment.&lt;/p&gt;
&lt;p&gt;Secondly, &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;my-sandbox/bin/&lt;/span&gt;&lt;/tt&gt; is added to your &lt;tt class=&quot;docutils literal&quot;&gt;PATH&lt;/tt&gt;. So, running
&lt;tt class=&quot;docutils literal&quot;&gt;python&lt;/tt&gt; calls the specific python executable placed in
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;my-sandbox/bin&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;Note&lt;/dt&gt;
&lt;dd&gt;It is possible to improve the sandbox isolation by ignoring the
global paths and your &lt;tt class=&quot;docutils literal&quot;&gt;PYTHONPATH&lt;/tt&gt; (see &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#improve-isolation&quot;&gt;Improve isolation&lt;/a&gt;
section).&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;installing-package&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id8&quot;&gt;Installing package&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It is possible to install any packages in the sandbox without any
superuser privilege. For instance, we will install the
&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;pylint&lt;/a&gt; development revision
in the sandbox.&lt;/p&gt;
&lt;p&gt;Suppose that you have the pylint stable version already installed in
your global environment:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
(my-sandbox)$ deactivate
$ python -c &#39;from pylint.__pkginfo__ import version;print version&#39;
0.18.0
&lt;/pre&gt;
&lt;p&gt;Once your sandbox activated, install the development revision of
&lt;tt class=&quot;docutils literal&quot;&gt;pylint&lt;/tt&gt; as an update:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ source /home/you/some/where/my-sandbox/bin/activate
(my-sandbox)$ pip install -U hg+http://www.logilab.org/hg/pylint#egg=pylint-0.19
&lt;/pre&gt;
&lt;p&gt;The new package and its dependencies are only installed in the sandbox:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
(my-sandbox)$ python -c &#39;import pylint.__pkginfo__ as p;print p.version, p.__file__&#39;
0.19.0 /home/you/some/where/my-sandbox/lib/python2.6/site-packages/pylint/__pkginfo__.pyc
(my-sandbox)$ deactivate
$ python -c &#39;import pylint.__pkginfo__ as p;print p.version, p.__file__&#39;
0.18.0 /usr/lib/pymodules/python2.6/pylint/__pkginfo__.pyc
&lt;/pre&gt;
&lt;p&gt;You can safely do any change in the new pylint code or in others
sandboxed packages because your global environment is still
unchanged.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;useful-options&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id9&quot;&gt;Useful options&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;improve-isolation&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id10&quot;&gt;Improve isolation&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;As said before, your sandboxed python sys.path still references the global
system path. You can however hide them by:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;either use the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;--no-site-packages&lt;/span&gt;&lt;/tt&gt;  that do not give
access to the global site-packages directory to the sandbox&lt;/li&gt;
&lt;li&gt;or change your &lt;tt class=&quot;docutils literal&quot;&gt;PYTHONPATH&lt;/tt&gt; in &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;my-sandbox/bin/activate&lt;/span&gt;&lt;/tt&gt;
in the same way as for &lt;tt class=&quot;docutils literal&quot;&gt;PATH&lt;/tt&gt; (see &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#tips&quot;&gt;tips&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ virtualenv --no-site-packages closedPy
$ sed -i &#39;9i PYTHONPATH=&amp;quot;$_OLD_PYTHON_PATH&amp;quot;
      9i export PYTHONPATH
      9i unset _OLD_PYTHON_PATH
      40i _OLD_PYTHON_PATH=&amp;quot;$PYTHONPATH&amp;quot;
      40i PYTHONPATH=&amp;quot;.&amp;quot;
      40i export PYTHONPATH&#39; closedPy/bin/activate
$ source closedPy/bin/activate
(closedPy)$ python -c &#39;import sys; print &amp;quot;\n&amp;quot;.join(sys.path)&#39;
/home/you/some/where/closedPy/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg
/home/you/some/where/closedPy
/home/you/some/where/closedPy/lib/python2.5
/home/you/some/where/closedPy/lib/python2.5/plat-linux2
/home/you/some/where/closedPy/lib/python2.5/lib-tk
/home/you/some/where/closedPy/lib/python2.5/lib-dynload
/usr/lib/python2.5
/usr/lib64/python2.5
/usr/lib/python2.5/lib-tk
/home/you/some/where/closedPy/lib/python2.5/site-packages
$ deactivate
&lt;/pre&gt;
&lt;p&gt;This way, you&#39;ll get an even more isolated sandbox, just
as with a brand new python environment.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;work-with-different-versions-of-python&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id11&quot;&gt;Work with different versions of Python&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;It is possible to dedicate a sandbox to a
particular version of python by using the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;--python=PYTHON_EXE&lt;/span&gt;&lt;/tt&gt;
which specifies the interpreter that &lt;tt class=&quot;docutils literal&quot;&gt;virtualenv&lt;/tt&gt; was installed with
(default is &lt;tt class=&quot;docutils literal&quot;&gt;/usr/bin/python&lt;/tt&gt;):&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ virtualenv --python=python2.4 pyver24
$ source pyver24/bin/activate
(pyver24)$ python -V
Python 2.4.6
$ deactivate
$ virtualenv --python=python2.5 pyver25
$ source pyver25/bin/activate
(pyver25)$ python -V
Python 2.5.2
$ deactivate
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;distribute-a-sandbox&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id12&quot;&gt;Distribute a sandbox&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To distribute your sandbox, you must use the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;--relocatable&lt;/span&gt;&lt;/tt&gt; option
that makes an &lt;strong&gt;existing&lt;/strong&gt; sandbox relocatable.
This fixes up scripts and makes all .pth files relative
This option should be called just before you distribute the sandbox (each
time you have changed something in your sandbox).&lt;/p&gt;
&lt;p&gt;An important point is that the host system should be similar to your own.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;tips&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id13&quot;&gt;Tips&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;speed-up-sandbox-manipulation&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id14&quot;&gt;Speed up sandbox manipulation&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Add these scripts to your &lt;tt class=&quot;docutils literal&quot;&gt;.bashrc&lt;/tt&gt; in order to help you using
&lt;tt class=&quot;docutils literal&quot;&gt;virtualenv&lt;/tt&gt; and automate the creation and activation processes.&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
rel2abs() {
#from http://unix.derkeiler.com/Newsgroups/comp.unix.programmer/2005-01/0206.html
  [ &amp;quot;$#&amp;quot; -eq 1 ] || return 1
  ls -Ld -- &amp;quot;$1&amp;quot; &amp;gt; /dev/null || return
  dir=$(dirname -- &amp;quot;$1&amp;quot; &amp;amp;&amp;amp; echo .) || return
  dir=$(cd -P -- &amp;quot;${dir%??}&amp;quot; &amp;amp;&amp;amp; pwd -P &amp;amp;&amp;amp; echo .) || return
  dir=${dir%??}
  file=$(basename -- &amp;quot;$1&amp;quot; &amp;amp;&amp;amp; echo .) || return
  file=${file%??}
  case $dir in
    /) printf &#39;%s\n&#39; &amp;quot;/$file&amp;quot;;;
    /*) printf &#39;%s\n&#39; &amp;quot;$dir/$file&amp;quot;;;
    *) return 1;;
  esac
  return 0
}
function activate(){
    if [[ &amp;quot;$1&amp;quot; == &amp;quot;--help&amp;quot; ]]; then
        echo -e &amp;quot;usage: activate PATH\n&amp;quot;
        echo -e &amp;quot;Activate the sandbox where PATH points inside of.\n&amp;quot;
        return
    fi
    if [[ &amp;quot;$1&amp;quot; == &#39;&#39; ]]; then
        local target=$(pwd)
    else
        local target=$(rel2abs &amp;quot;$1&amp;quot;)
    fi
    until  [[ &amp;quot;$target&amp;quot; == &#39;/&#39; ]]; do
        if test -e &amp;quot;$target/bin/activate&amp;quot;; then
            source &amp;quot;$target/bin/activate&amp;quot;
            echo &amp;quot;$target sandbox activated&amp;quot;
            return
        fi
        target=$(dirname &amp;quot;$target&amp;quot;)
    done
    echo &#39;no sandbox found&#39;
}
function mksandbox(){
    if [[ &amp;quot;$1&amp;quot; == &amp;quot;--help&amp;quot; ]]; then
        echo -e &amp;quot;usage: mksandbox NAME\n&amp;quot;
        echo -e &amp;quot;Create and activate a highly isaolated sandbox named NAME.\n&amp;quot;
        return
    fi
    local name=&#39;sandbox&#39;
    if [[ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]]; then
        name=&amp;quot;$1&amp;quot;
    fi
    if [[ -e &amp;quot;$1/bin/activate&amp;quot; ]]; then
        echo &amp;quot;$1 is already a sandbox&amp;quot;
        return
    fi
    virtualenv --no-site-packages --clear --distribute &amp;quot;$name&amp;quot;
    sed -i &#39;9i PYTHONPATH=&amp;quot;$_OLD_PYTHON_PATH&amp;quot;
            9i export PYTHONPATH
            9i unset _OLD_PYTHON_PATH
           40i _OLD_PYTHON_PATH=&amp;quot;$PYTHONPATH&amp;quot;
           40i PYTHONPATH=&amp;quot;.&amp;quot;
           40i export PYTHONPATH&#39; &amp;quot;$name/bin/activate&amp;quot;
    activate &amp;quot;$name&amp;quot;
}
&lt;/pre&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;Note:&lt;/dt&gt;
&lt;dd&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv-commands&quot;&gt;virtualenv-commands&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenvwrapper&quot;&gt;virtualenvwrapper&lt;/a&gt; projects add some very
interesting features to &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#virtualenv&quot;&gt;virtualenv&lt;/a&gt;. So, put on eye on them for more advanced features than the above ones.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusion&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id15&quot;&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I found it to be irreplaceable for testing new configurations or
working on projects with different dependencies. Moreover, I use it to
learn about other python projects, how my project exactly interacts
with its dependencies (during debugging) or to test the final user
experience.&lt;/p&gt;
&lt;p&gt;All of this stuff can be done without &lt;tt class=&quot;docutils literal&quot;&gt;virtualenv&lt;/tt&gt; but not in such an easy and secure way.&lt;/p&gt;
&lt;p&gt;I will continue the series by introducing other useful projects
to enhance your productivity : &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#pip&quot;&gt;pip&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#distribute&quot;&gt;Distribute&lt;/a&gt;. See you
soon.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;other-documentation-and-links&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/view?rql=Any%20X%2CT%2CCD%20ORDERBY%20CD%20DESC%20WHERE%20X%20is%20BlogEntry%2C%20X%20title%20T%2C%20X%20creation_date%20CD&amp;amp;vid=rss#id16&quot;&gt;Other Documentation and Links&lt;/a&gt;&lt;/h3&gt;
&lt;p id=&quot;virtualenv&quot;&gt;&lt;em&gt;virtualenv&lt;/em&gt; homepage: &lt;a class=&quot;reference&quot; href=&quot;http://virtualenv.openplans.org/&quot;&gt;http://virtualenv.openplans.org/&lt;/a&gt;&lt;/p&gt;
&lt;p id=&quot;pip&quot;&gt;&lt;em&gt;pip&lt;/em&gt; homepage: &lt;a class=&quot;reference&quot; href=&quot;http://pip.openplans.org/&quot;&gt;http://pip.openplans.org/&lt;/a&gt;&lt;/p&gt;
&lt;p id=&quot;distribute&quot;&gt;&lt;em&gt;Distribute&lt;/em&gt; homepage: &lt;a class=&quot;reference&quot; href=&quot;http://packages.python.org/distribute/&quot;&gt;http://packages.python.org/distribute/&lt;/a&gt;&lt;/p&gt;
&lt;p id=&quot;virtualenv-commands&quot;&gt;&lt;em&gt;virtualenv-commands&lt;/em&gt; extension for &lt;em&gt;virtualenv&lt;/em&gt; : &lt;a class=&quot;reference&quot; href=&quot;http://thisismedium.com/tech/extending-virtualenv/&quot;&gt;http://thisismedium.com/tech/extending-virtualenv/&lt;/a&gt;&lt;/p&gt;
&lt;p id=&quot;virtualenvwrapper&quot;&gt;&lt;em&gt;virtualenvwrapper&lt;/em&gt; extension for &lt;em&gt;virtualenv&lt;/em&gt; : &lt;a class=&quot;reference&quot; href=&quot;http://www.doughellmann.com/projects/virtualenvwrapper&quot;&gt;http://www.doughellmann.com/projects/virtualenvwrapper&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(Image under &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.0/&quot;&gt;creative commons by-nc-nd&lt;/a&gt; by &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/minlynn/&quot;&gt;minlynn071502  / Mindy Roth&lt;/a&gt;)&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-03-26T10:19-01:00</dc:date>
  <dc:creator>Alain Leufroy</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/22400</guid>
  <title>Astng 0.20.0 and Pylint 0.20.0 releases</title>
  <link>http://www.logilab.org/blogentry/22400</link>
  <description>&lt;p&gt;We are happy to announce the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;Astng&lt;/a&gt; 0.20.0 and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;Pylint&lt;/a&gt; 0.20.0 releases.&lt;/p&gt;
&lt;p&gt;Pylint is a static code checker based on Astng, both depending on logilab-common 0.49.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;id1&quot;&gt;
&lt;h3&gt;&lt;a&gt;Astng&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Astng 0.20.0 is a major refactoring:
instead of parsing and modifying the syntax tree generated from python&#39;s &lt;em&gt;_ast&lt;/em&gt; or &lt;em&gt;compiler.ast&lt;/em&gt; modules,
the syntax tree is rebuilt. Thus the code becomes much clearer, and
all monkey patching will eventually disappear from this module.&lt;/p&gt;
&lt;p&gt;Speed improvement is achieved by caching the parsed modules earlier to avoid double parsing,
and avoiding some repeated inferences, all along fixing a lot of important bugs.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;id2&quot;&gt;
&lt;h3&gt;&lt;a&gt;Pylint&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Pylint 0.20.0 uses the new Astng, and fixes a lot of bugs too, adding some
new functionality:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;parameters with leading &amp;quot;_&amp;quot; shouldn&#39;t count as &amp;quot;local&amp;quot; variables&lt;/li&gt;
&lt;li&gt;warn on assert( a, b )&lt;/li&gt;
&lt;li&gt;warning if return or break inside a finally&lt;/li&gt;
&lt;li&gt;specific message for NotImplemented exception&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We would like to thank Chmouel Boudjnah, Johnson Fletcher, Daniel Harding, Jonathan Hartley, Colin Moris, Winfried Plapper, Edward K. Ream and Pierre Rouleau for their contributions, and all other people helping the project to progress.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-03-24T11:59-01:00</dc:date>
  <dc:creator>Emile Anclin</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/22203</guid>
  <title>pylint bugs day #2 on april 16, 2010</title>
  <link>http://www.logilab.org/blogentry/22203</link>
  <description>&lt;p&gt;Hey guys,&lt;/p&gt;
&lt;p&gt;we&#39;ll hold the next &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/18781&quot;&gt;pylint bugs day&lt;/a&gt; on april 16th 2010 (friday). If some of you want to come and work with us in our &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr/contact&quot;&gt;Paris office&lt;/a&gt;, you&#39;ll be much welcome.&lt;/p&gt;
&lt;p&gt;Else you can still join us on jabber / irc:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;jabber: chat room &lt;a class=&quot;reference&quot; href=&quot;mailto:public&amp;#64;jabber.logilab.org&quot;&gt;public&amp;#64;jabber.logilab.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;irc: #public on &lt;a class=&quot;reference&quot; href=&quot;irc://irc.logilab.org&quot;&gt;irc://irc.logilab.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See you then!&lt;/p&gt;
</description>
  <dc:date>2010-03-22T14:08-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/22199</guid>
  <title>PostgreSQL on windows : plpythonu and &quot;specified module could not be found&quot; error</title>
  <link>http://www.logilab.org/blogentry/22199</link>
  <description>&lt;p&gt;I recently had to (remotely) debug an issue on windows involving
&lt;a class=&quot;reference&quot; href=&quot;http://www.postgresql.org/&quot;&gt;PostgreSQL&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.postgresql.org/docs/8.4/interactive/plpython.html&quot;&gt;PL/Python&lt;/a&gt;. Basically, two very similar computers, with
Python2.5 installed via &lt;a class=&quot;reference&quot; href=&quot;http://www.pythonxy.com/&quot;&gt;python(x,y)&lt;/a&gt;, PostgreSQL 8.3.8 installed via
the &lt;a class=&quot;reference&quot; href=&quot;http://www.postgresql.org/ftp/binary/v8.3.8/win32/&quot;&gt;binary installer&lt;/a&gt;. On the first machine &lt;tt class=&quot;docutils literal&quot;&gt;create language
plpythonu;&lt;/tt&gt; worked like a charm, and on the other one, it failed with
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C:\\Program&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;Files\\Postgresql\\8.3\\plpython.dll:&lt;/span&gt; specified module
could not be found&lt;/tt&gt;. This is caused by the dynamic linker not finding
some DLL. Using &lt;a class=&quot;reference&quot; href=&quot;http://www.dependencywalker.com/&quot;&gt;Depends.exe&lt;/a&gt; showed that
&lt;tt class=&quot;docutils literal&quot;&gt;plpython.dll&lt;/tt&gt; looks for &lt;tt class=&quot;docutils literal&quot;&gt;python25.dll&lt;/tt&gt; (the one it was built
against in the 8.3.8 installer), but that the DLL was there.&lt;/p&gt;
&lt;p&gt;I&#39;ll save the various things we tried and jump directly to the
solution. After much head scratching, it turned out that the first
computer had &lt;a class=&quot;reference&quot; href=&quot;http://tortoisehg.bitbucket.org/&quot;&gt;TortoiseHg&lt;/a&gt; installed. This caused &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C:\\Program&lt;/span&gt;
&lt;span class=&quot;pre&quot;&gt;Files\\TortoiseHg&lt;/span&gt;&lt;/tt&gt; to be included in the System PATH environment
variable, and that directory contains &lt;tt class=&quot;docutils literal&quot;&gt;python25.dll&lt;/tt&gt;. On the other
hand &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C:\\Python25&lt;/span&gt;&lt;/tt&gt; was in the user&#39;s PATH environment variable on both
computers. As the database Windows service runs using a dedicated
local account (typically with login &lt;tt class=&quot;docutils literal&quot;&gt;postgres&lt;/tt&gt;), it would not have
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C:\\Python25&lt;/span&gt;&lt;/tt&gt; in its PATH, but if TortoiseHg was there, it would
find the DLL in some other directory. So the solution was to add
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;C:\\Python25&lt;/span&gt;&lt;/tt&gt; to the system PATH.&lt;/p&gt;
</description>
  <dc:date>2010-03-22T13:37-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/22007</guid>
  <title>L&#39;intégration continue présenté par Agiles Nantes</title>
  <link>http://www.logilab.org/blogentry/22007</link>
  <description>&lt;p&gt;Hier, Logilab était à nouveau présent aux rencontres organisées par
&lt;a class=&quot;reference&quot; href=&quot;http://www.agilenantes.org/&quot;&gt;Agiles Nantes&lt;/a&gt;, il s&#39;agissait d&#39;une présentation très fournie sur
l&#39;&lt;a class=&quot;reference&quot; href=&quot;http://www.agilenantes.org/2010/02/22/lintegration-continue-mercredi-17-mars-2010/&quot;&gt;intégration continue&lt;/a&gt; (présenté par la société
&lt;a class=&quot;reference&quot; href=&quot;http://www.netapsys.fr/&quot;&gt;Netapsys&lt;/a&gt;). Malheureusement, la principale technologie utilisée
était Java dont nous ne sommes pas des grands fans, préférant
python. Néanmoins cela donne une bonne idée des possibilités
qu&#39;offrent les outils autour du développement java, notamment en terme
d&#39;intégration continue (voir &lt;a class=&quot;reference&quot; href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://hudson-ci.org/&quot;&gt;Hudson&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://sonar.codehaus.org/&quot;&gt;Sonar&lt;/a&gt;, etc.).&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://hudson-ci.org/images/butler.png&quot; class=&quot;align-right&quot; src=&quot;http://hudson-ci.org/images/butler.png&quot; /&gt;
&lt;p&gt;On retrouve donc un certain nombre de similarités avec le monde
python, notamment avec &lt;a class=&quot;reference&quot; href=&quot;http://www.jfrog.org/products.php&quot;&gt;Artifactory&lt;/a&gt; qui reproduit en partie les
fonctionnalités de &lt;a class=&quot;reference&quot; href=&quot;http://pypi.python.org/pypi&quot;&gt;pypi&lt;/a&gt; avec &lt;a class=&quot;reference&quot; href=&quot;http://pypi.python.org/pypi/setuptools&quot;&gt;easy_install&lt;/a&gt; ou &lt;a class=&quot;reference&quot; href=&quot;http://www.buildout.org/&quot;&gt;buildout&lt;/a&gt; ou
apt-cacher-ng dans son coté proxy. A Logilab, nous privilégions
l&#39;utilisation de paquets &lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org/&quot;&gt;debian&lt;/a&gt; pour distribuer nos logiciels, ce
qui permet, notamment, de ne pas réinventer la roue pour chaque
langage de programmation.&lt;/p&gt;
&lt;p&gt;Voici quelques une des notions avancées lors de la présentation qui
nous semblent intéressantes sur l&#39;intégration continue :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;celle-ci permet de mettre en place des environnements de test mis à
disposition du client tout le long du projet.&lt;/li&gt;
&lt;li&gt;cette notion de prototype utilisable en continu doit être présente
le plus tôt possible dans un projet.&lt;/li&gt;
&lt;li&gt;idéalement, un serveur de déploiement/intégration doit être
quasiment à l&#39;identique de l&#39;environnement client (utilisation de
machines virtuelles)&lt;/li&gt;
&lt;li&gt;l&#39;intégration continue est souvent plus utilisées par les
développeurs et les chefs de projets que par les clients. Mettre en
place des rapports utiles au client requiert un soin particulier&lt;/li&gt;
&lt;li&gt;pour une émulation collective, certaines notations des développeurs
sont possible. Par exemple un &lt;a class=&quot;reference&quot; href=&quot;http://wiki.hudson-ci.org/display/HUDSON/The+Continuous+Integration+Game+plugin&quot;&gt;plugin&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://hudson-ci.org/&quot;&gt;Hudson&lt;/a&gt; donne un point par
build réussi, un point par test ajouté, moins dix points pour un build
cassé.&lt;/li&gt;
&lt;li&gt;la visualisation des données peut motiver les développeurs, l&#39;outil
Sonar semble être très complet et propose des visualisation assez
léchées. A noter, des graphes sur la complexité du code, par classe,
par méthode etc. Voir aussi la visualisation de l&#39;arbre des
dépendances des librairies avec &lt;a class=&quot;reference&quot; href=&quot;http://docs.codehaus.org/display/SONAR/Radiator+Plugin&quot;&gt;Radiator&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://sonar.codehaus.org/wp-content/themes/sonar/images/dashboard.png&quot; class=&quot;align-center&quot; src=&quot;http://sonar.codehaus.org/wp-content/themes/sonar/images/dashboard.png&quot; /&gt;&lt;/div&gt;
&lt;p&gt;J&#39;y ai mentionné &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot&quot;&gt;apycot&lt;/a&gt; et &lt;a class=&quot;reference&quot; href=&quot;http://buildbot.net/trac&quot;&gt;buildbot&lt;/a&gt; qui sont tous les deux des outils plutôt orientés python (mais pas seulement).&lt;/p&gt;
&lt;p&gt;Pour conclure, tout ça m&#39;a fait penser au concept plus poussé de
&lt;a class=&quot;reference&quot; href=&quot;http://www.martinfowler.com/bliki/BlueGreenDeployment.html&quot;&gt;&amp;quot;Continuous Delivery - BlueGreenDelivery&amp;quot;&lt;/a&gt; développé par Martin Fowler,
une lecture recommandée pour ceux qui ont déjà pris le pas de
l&#39;intégration continue.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.martinfowler.com/bliki/images/blueGreenDeployment/blue_green_deployments.png&quot; class=&quot;align-center&quot; src=&quot;http://www.martinfowler.com/bliki/images/blueGreenDeployment/blue_green_deployments.png&quot; /&gt;&lt;/div&gt;
</description>
  <dc:date>2010-03-18T09:59-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/21855</guid>
  <title>Now publishing blog entries under creative commons</title>
  <link>http://www.logilab.org/blogentry/21855</link>
  <description>&lt;p&gt;Logilab is proud to announce that the blog entries published on the blogs of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org&quot;&gt;http://www.logilab.org&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;http://www.cubicweb.org&lt;/a&gt; are now licensed under a Creative Commons Attribution-Share Alike 2.0 License (check out the footer).&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://creativecommons.org/images/deed/seal.png&quot; class=&quot;align-right&quot; src=&quot;http://creativecommons.org/images/deed/seal.png&quot; /&gt;
&lt;p&gt;We often use creative commons licensed photographs to illustrate this blog, and felt that being developers of open source software it was quite logical that some of our content should be published under a similar license. Some of the documentation that we release also uses this license, for example the &lt;a class=&quot;reference&quot; href=&quot;https://hg.python-science.org/salome-packaging/raw-file/0ebde7ce08e0/building-salome.rst&quot;&gt;&amp;quot;Building Salome&amp;quot; documentation&lt;/a&gt;. This license footer has been integrated to the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb-blog/&quot;&gt;cubicweb-blog&lt;/a&gt; package that is used to publish our sites (as part of &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb-forge/&quot;&gt;cubicweb-forge&lt;/a&gt;).&lt;/p&gt;
</description>
  <dc:date>2010-03-15T12:57-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20770</guid>
  <title>On a fait un tour au Coding Dojo à Nantes</title>
  <link>http://www.logilab.org/blogentry/20770</link>
  <description>&lt;p&gt;L&#39;association de promotion des méthodes Agiles sur Nantes et sa région [&lt;a class=&quot;reference&quot; href=&quot;http://www.agilenantes.org/&quot;&gt;1&lt;/a&gt;] organisait hier soir un &amp;quot;Coding Dojo&amp;quot;. C&#39;est une session de codage en public avec des créneaux de 15 minutes par codeur (&lt;a class=&quot;reference&quot; href=&quot;http://codingdojo.org/cgi-bin/wiki.pl?back=WhatIsCodingDojo&quot;&gt;explication sur codingdojo.org&lt;/a&gt;). Le focus de la session était le &lt;a class=&quot;reference&quot; href=&quot;http://fr.wikipedia.org/wiki/Test_Driven_Development&quot;&gt;TDD&lt;/a&gt; (Test Driven Developpement).&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://farm3.static.flickr.com/2509/3947717979_34e5a68d3d_m.jpg&quot; class=&quot;align-center&quot; src=&quot;http://farm3.static.flickr.com/2509/3947717979_34e5a68d3d_m.jpg&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Annonce de l&#39;événement sur leur site : &lt;a class=&quot;reference&quot; href=&quot;http://www.agilenantes.org/2010/01/25/coding-dojo-mercredi-17-fevrier-2010/&quot;&gt;http://www.agilenantes.org/2010/01/25/coding-dojo-mercredi-17-fevrier-2010/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/rstiller/3947717979/&quot;&gt;Photo&lt;/a&gt; par &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/people/rstiller/&quot;&gt;yepyep&lt;/a&gt; sous licence &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/&quot;&gt;creative commons&lt;/a&gt;&lt;/p&gt;
</description>
  <dc:date>2010-02-18T12:34-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20600</guid>
  <title>Launching Python scripts via Condor</title>
  <link>http://www.logilab.org/blogentry/20600</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://farm2.static.flickr.com/1362/1402963775_0185d2e62f.jpg&quot; class=&quot;align-left&quot; src=&quot;http://farm2.static.flickr.com/1362/1402963775_0185d2e62f.jpg&quot; /&gt;
&lt;p&gt;As part of an ongoing customer project, I&#39;ve been learning about the &lt;a class=&quot;reference&quot; href=&quot;http://www.cs.wisc.edu/condor/&quot;&gt;Condor&lt;/a&gt; queue management system (actually it is more than just a batch queue management system, tacking the &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/High-throughput_computing&quot;&gt;High-throughput computing&lt;/a&gt; problem, but in my current project, we&#39;re not using the full possibilities of Condor, and the choice was dictated by other considerations outside the scope of this note). The documentation is excellent, and the features of the product are really amazing (pity the project runs on Windows, and we cannot use 90% of these...).&lt;/p&gt;
&lt;p&gt;To launch a job on a computer participating in the Condor farm, you just have to write a job file which looks like this:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Universe=vanilla
Executable=$path_to_executabe
Arguments=$arguments_to_the_executable
InitialDir=$working_directory
Log=$local_logfile_name
Output=$local_file_for_job_stdout
Error=$local_file_for_job_stderr
Queue
&lt;/pre&gt;
&lt;p&gt;and then run &lt;tt class=&quot;docutils literal&quot;&gt;condor_submit my_job_file&lt;/tt&gt; and use &lt;tt class=&quot;docutils literal&quot;&gt;condor_q&lt;/tt&gt; to monitor the status your job (queued, running...)&lt;/p&gt;
&lt;p&gt;My program is generating Condor job files and submitting them, and I&#39;ve spent hours yesterday trying to understand why they were all failing : the stderr file contained a message from Python complaining that it could not import site and exiting.&lt;/p&gt;
&lt;p&gt;A point which was not clear in the documentation I read (but I probably overlooked it) is that the executable mentionned in the job file is supposed to be a local file on the submission host which is copied to the computer running the job. In the jobs generated by my code, I was using sys.executable for the Executable field, and a path to the python script I wanted to run in the Arguments field. This resulted in the Python interpreter being copied on the execution host and not being able to run because it was not able to find the standard files it needs at startup.&lt;/p&gt;
&lt;p&gt;Once I figured this out, the fix was easy: I made my program write a batch script which launched the Python script and changed the job to run that script.&lt;/p&gt;
&lt;p&gt;UPDATE : I&#39;m told there is a Transfer_executable=False line I could have put in the script to achieve the same thing.&lt;/p&gt;
&lt;p&gt;(&lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/gudi3101/1402963775/&quot;&gt;photo&lt;/a&gt; by &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/gudi3101/&quot;&gt;gudi&amp;amp;cris&lt;/a&gt; licenced under &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-nd/2.0/deed.fr&quot;&gt;CC-BY-ND&lt;/a&gt;)&lt;/p&gt;
</description>
  <dc:date>2010-02-17T08:56-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20553</guid>
  <title>Adding Mercurial build identification to Python</title>
  <link>http://www.logilab.org/blogentry/20553</link>
  <description>&lt;p&gt;This work is a part of the build identification task found in the PEP 385, Migrating from svn to Mercurial:
&lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/dev/peps/pep-0385/&quot;&gt;http://www.python.org/dev/peps/pep-0385/&lt;/a&gt;
It was done during the Mercurial sprint hosted at Logilab. If you would like to see the result, just follow
the steps:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
hg clone http://hg.xavamedia.nl/cpython/pymigr/
cd pymigr/build-identification
&lt;/pre&gt;
&lt;div class=&quot;section&quot; id=&quot;setting-up-the-environment&quot;&gt;
&lt;h3&gt;&lt;a&gt;Setting up the environment&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The current Python development branch is first checkout:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
svn co http://svn.python.org/projects/python/trunk
&lt;/pre&gt;
&lt;p&gt;A patch will be applied for adding the &#39;sys.mercurial&#39; attribute
and modifying the build informations:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
cp add-hg-build-id.diff trunk/
cd trunk
svn up -r 78019
patch -p0 &amp;lt; add-hg-build-id.diff
&lt;/pre&gt;
&lt;p&gt;The changed made to &#39;configure.in&#39; need then to be propagated
to the configure script:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
autoconf
&lt;/pre&gt;
&lt;p&gt;The configuration is then done by:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
./configure --enable-shared --prefix=/dev/null
&lt;/pre&gt;
&lt;p&gt;You should now see changes propagated to the Makefile for finding
the revision, the tag and the branch:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
grep MERCURIAL Makefile
&lt;/pre&gt;
&lt;p&gt;Finally, Python can be built:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
make
&lt;/pre&gt;
&lt;p&gt;The sys.mercurial attribute should already be present:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
LD_LIBRARY_PATH=. ./python
&amp;gt;&amp;gt;&amp;gt; import sys
&amp;gt;&amp;gt;&amp;gt; sys.mercurial
(&#39;CPython&#39;, &#39;&#39;, &#39;&#39;)
&lt;/pre&gt;
&lt;p&gt;No tag nor revision have been found as there was no mercurial repository. A test
by the Py_GetBuildInfo() in the C API will also be built:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
gcc -o show-build-info -I. -IInclude -L. -lpython2.7 ../show-build-info.c
&lt;/pre&gt;
&lt;p&gt;You can test its result by:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
LD_LIBRARY_PATH=. ./show-build-info
-&amp;gt; default, Feb  7 2010, 15:07:46
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;manual-test&quot;&gt;
&lt;h3&gt;&lt;a&gt;Manual test&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First a fake mercurial tree is built:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
hg init
hg add README
hg ci -m &amp;quot;Initial repo&amp;quot;
hg id
-&amp;gt; 84a6de74e48f tip
&lt;/pre&gt;
&lt;p&gt;Now Python needs to be built with the given mercurial information:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
rm Modules/getbuildinfo.o
make
&lt;/pre&gt;
&lt;p&gt;You should then see the current revision number:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
LD_LIBRARY_PATH=. ./python
&amp;gt;&amp;gt;&amp;gt; import sys
&amp;gt;&amp;gt;&amp;gt; sys.mercurial
(&#39;CPython&#39;, &#39;default&#39;, &#39;84a6de74e48f&#39;)
&lt;/pre&gt;
&lt;p&gt;and the C API can be tested by:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
LD_LIBRARY_PATH=. ./show-build-info
-&amp;gt; default:84a6de74e48f, Feb  7 2010, 15:10:13
&lt;/pre&gt;
&lt;p&gt;The fake mercurial repository can now be cleaned:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
rm -rf .hg
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;automatic-tests&quot;&gt;
&lt;h3&gt;&lt;a&gt;Automatic tests&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Automatic tests for checking the behavior for every cases will now work
build Python and clean afterward. Those tests work only when run from the
trunk svn directory of Python:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
python ../test_build_identification.py
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;further-work&quot;&gt;
&lt;h3&gt;&lt;a&gt;Further work&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The current work is only an attempt to add the mercurial build identification to Python, it
still needs to be checked on production cases. Moreover the build identification on Windows has
not been started yet, it will need to be integrated to the Microsoft Visual Studio building process.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-02-15T16:41-01:00</dc:date>
  <dc:creator>Andre Espaze</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20469</guid>
  <title>Why you shoud get rid of os.system, os.popen, etc. in your code</title>
  <link>http://www.logilab.org/blogentry/20469</link>
  <description>&lt;p&gt;I regularly come across code such as:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;output&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;popen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;diff -u &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;appl_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ref_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Code like this might well work machine but it is buggy and will fail (preferably during the demo or once shipped).&lt;/p&gt;
&lt;p&gt;Where is the bug?&lt;/p&gt;
&lt;p&gt;It is in the use of %s, which can inject in your command any string you want and also strings you don&#39;t want. The problem is that you probably did not check appl_file and ref_file for weird things (spaces, quotes, semi colons...). Putting quotes around the %s in the string will not solve the issue.&lt;/p&gt;
&lt;p&gt;So what should you do? The answer is &amp;quot;use the subprocess module&amp;quot;:  &lt;tt class=&quot;docutils literal&quot;&gt;subprocess.Popen&lt;/tt&gt; takes a list of arguments as first parameter, which are passed as-is to the new process creation system call of your platform, and not interpreted by the shell:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;pipe&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;subprocess&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Popen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;diff&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;-u&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;appl_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ref_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stdout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;subprocess&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PIPE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;output&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pipe&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stdout&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;By now, you should have guessed that the &lt;tt class=&quot;docutils literal&quot;&gt;shell=True&lt;/tt&gt; parameter of &lt;tt class=&quot;docutils literal&quot;&gt;subprocess.Popen&lt;/tt&gt; should not be used unless you really really need it (and even them, I encourage you to question that need).&lt;/p&gt;
</description>
  <dc:date>2010-02-12T12:43-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20440</guid>
  <title>Apycot for Mercurial</title>
  <link>http://www.logilab.org/blogentry/20440</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/20439?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/20439?vid=download&quot; style=&quot;width: 400px;&quot; /&gt;
&lt;div class=&quot;section&quot; id=&quot;what-is-apycot&quot;&gt;
&lt;h3&gt;&lt;a&gt;What is apycot&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot&quot;&gt;apycot&lt;/a&gt; is a highly extensible test automatization tool used for
Continuous Integration. It can:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;download the project from a version controlled repository (like SVN or Hg);&lt;/li&gt;
&lt;li&gt;install it from scratch with all dependencies;&lt;/li&gt;
&lt;li&gt;run various &lt;em&gt;checkers&lt;/em&gt;;&lt;/li&gt;
&lt;li&gt;store the results in a &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; database;&lt;/li&gt;
&lt;li&gt;post-process the results;&lt;/li&gt;
&lt;li&gt;display the results in various format (html, xml, pdf, mail, RSS...);&lt;/li&gt;
&lt;li&gt;repeat the whole procedure with various configurations;&lt;/li&gt;
&lt;li&gt;get triggered by new changesets or run periodically.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For an example, take a look at the &amp;quot;test reports&amp;quot; tab of the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-common&quot;&gt;logilab-common&lt;/a&gt; project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;setting-up-an-apycot-for-mercurial&quot;&gt;
&lt;h3&gt;&lt;a&gt;Setting up an apycot for Mercurial&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;During the &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/&quot;&gt;mercurial&lt;/a&gt; sprint, we set up a &lt;em&gt;proof-of-concept&lt;/em&gt; environment running six
different checkers:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Check syntax of all python files.&lt;/li&gt;
&lt;li&gt;Check syntax of all documentation files.&lt;/li&gt;
&lt;li&gt;Run &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;pylint&lt;/a&gt; on the mercurial source code with the mercurial &lt;tt class=&quot;docutils literal&quot;&gt;pylintrc&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Run the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;check-code.py&lt;/span&gt;&lt;/tt&gt; script included in mercurial checking style and python errors&lt;/li&gt;
&lt;li&gt;Run the Mercurial&#39;s test suite.&lt;/li&gt;
&lt;li&gt;Run Mercurial&#39;s benchmark on a reference repository.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first three checkers, shipped with apycot, were set up
quickly. The last three are mercurial specific and required few additional tweaks to
be integrated to apycot.&lt;/p&gt;
&lt;p&gt;The bot was setup to run with all public mercurial repositories. Five checkers immediately proved useful as they pointed out some errors or
warnings (on some rarely used contrib files it even found a syntax error).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;prospectives&quot;&gt;
&lt;h3&gt;&lt;a&gt;Prospectives&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A public instance is being set up. It will provide features that the community
is looking forward to:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;testing all python versions;&lt;/li&gt;
&lt;li&gt;running pure python or the C variant;&lt;/li&gt;
&lt;li&gt;code coverage of the test suite;&lt;/li&gt;
&lt;li&gt;performance history.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusion&quot;&gt;
&lt;h3&gt;&lt;a&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot&quot;&gt;apycot&lt;/a&gt; proved to be highly flexible and could quickly be adapted to Mercurial&#39;s
test suite even for people new to apycot. The advantages of continuously running
different long running tests is obvious. So apycot seems to be a very valuable
tool for improving the software development process.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-02-11T16:30-01:00</dc:date>
  <dc:creator>Pierre-Yves David</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20290</guid>
  <title>SCons presentation in 5 minutes</title>
  <link>http://www.logilab.org/blogentry/20290</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.scons.org/scons-logo-transparent.png&quot; class=&quot;align-right&quot; src=&quot;http://www.scons.org/scons-logo-transparent.png&quot; /&gt;
&lt;p&gt;Building software with SCons requires to have Python and &lt;a class=&quot;reference&quot; href=&quot;http://www.scons.org&quot;&gt;SCons&lt;/a&gt; installed.&lt;/p&gt;
&lt;p&gt;As SCons is only made of Python modules, the sources may be shipped
with your project if your clients can not install dependencies. All
the following exemples can be downloaded at the end of that blog.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;a-building-tool-for-every-file-extension&quot;&gt;
&lt;h3&gt;&lt;a&gt;A building tool for every file extension&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First a Fortran 77 program will be built made of two files:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;fortran-project
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scons -Q
gfortran -o cfib.o -c cfib.f
gfortran -o fib.o -c fib.f
gfortran -o compute-fib cfib.o fib.o
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./compute-fib
 First 10 Fibonacci numbers:
  0.  1.  1.  2.  3.  5.  8. 13. 21. 34.
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &#39;-Q&#39; option tell to Scons to be less verbose. For cleaning the
project, add the &#39;-c&#39; option:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scons -Qc
Removed cfib.o
Removed fib.o
Removed compute-fib
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;From this first example, it can been seen that SCons find the &#39;gfortran&#39;
tool from the file extension. Then have a look at the user&#39;s manual
if you want to set a particular tool.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;describing-the-construction-with-python-objects&quot;&gt;
&lt;h3&gt;&lt;a&gt;Describing the construction with Python objects&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A second C program will directly run the execution from the SCons file
by adding a test command:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;c-project
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scons -Q run-test
gcc -o test.o -c test.c
gcc -o fact.o -c fact.c
ar rc libfact.a fact.o
ranlib libfact.a
gcc -o &lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt;-fact test.o libfact.a
run_test&lt;span class=&quot;o&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;run-test&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;, &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;test-fact&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;
OK
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;However running scons alone builds only the main program:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scons -Q
gcc -o main.o -c main.c
gcc -o compute-fact main.o libfact.a
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./compute-fact
Computing factorial &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;: 5
Result: 120
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This second example shows that the construction dependency is described
by passing Python objects. An interesting point is the possibility to
add your own Python functions in the build process.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;hierarchical-build-with-environment&quot;&gt;
&lt;h3&gt;&lt;a&gt;Hierarchical build with environment&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A third C++ program will create a shared library used for two different
programs: the main application and a test suite. The main application
can be built by:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;cxx-project
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scons -Q
g++ -o main.o -c -Imbdyn-src main.cxx
g++ -o mbdyn-src/nodes.os -c -fPIC -Imbdyn-src mbdyn-src/nodes.cxx
g++ -o mbdyn-src/solver.os -c -fPIC -Imbdyn-src mbdyn-src/solver.cxx
g++ -o mbdyn-src/libmbdyn.so -shared mbdyn-src/nodes.os mbdyn-src/solver.os
g++ -o mbdyn main.o -Lmbdyn-src -lmbdyn
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It shows that SCons handles for us the compilation flags for creating a
shared library according to the tool (-fPIC). Moreover extra environment
variables have been given (CPPPATH, LIBPATH, LIBS), which are all
translated for the chosen tool. All those variables can be found
in the user&#39;s manual or in the man page.
The building and running of the test suite is made by giving an
extra variable:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ TEST_CMD&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;LD_LIBRARY_PATH=mbdyn-src ./%s&amp;quot;&lt;/span&gt; scons -Q run-tests
g++ -o tests/run_all_tests.o -c -Imbdyn-src tests/run_all_tests.cxx
g++ -o tests/test_solver.o -c -Imbdyn-src tests/test_solver.cxx
g++ -o tests/all-tests tests/run_all_tests.o tests/test_solver.o -Lmbdyn-src -lmbdyn
run_test&lt;span class=&quot;o&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;tests/run-tests&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;, &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;tests/all-tests&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;
OK
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusion&quot;&gt;
&lt;h3&gt;&lt;a&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;That is rather convenient to build softwares by manipulating Python
objects, moreover custom actions can be added in the process. SCons has
also a configuration mechanism working like autotools macros that can
be discovered in the user&#39;s manual.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2010-02-09T15:26-01:00</dc:date>
  <dc:creator>Andre Espaze</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20255</guid>
  <title>Extended 256 colors in bash prompt</title>
  <link>http://www.logilab.org/blogentry/20255</link>
  <description>&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/1.5sprint&quot;&gt;Mercurial 1.5 sprint&lt;/a&gt; is taking place in our offices this week-end and pair-programming with Steve made me want a better looking terminal. Have you seen his &lt;a class=&quot;reference&quot; href=&quot;http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/&quot;&gt;extravagant zsh prompt&lt;/a&gt; ? I used to have only 8 colors to decorate my shell prompt, but thanks to some time spent playing around, I now have 256.&lt;/p&gt;
&lt;p&gt;Here is what I used to have in my bashrc for 8 colors:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;NO_COLOUR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;LIGHT_WHITE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;37m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;WHITE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;37m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;GRAY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;30m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;BLACK&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;30m\]&amp;quot;&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;RED&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;31m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;LIGHT_RED&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;31m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;GREEN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;32m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;LIGHT_GREEN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;32m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;YELLOW&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;33m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;LIGHT_YELLOW&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;33m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;BLUE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;34m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;LIGHT_BLUE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;34m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;MAGENTA&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;35m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;LIGHT_MAGENTA&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;35m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;CYAN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[0;36m\]&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;LIGHT_CYAN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[1;36m\]&amp;quot;&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# set a fancy prompt&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PS1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;${RED}[\u@\h \W]\$${NO_COLOUR} &amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Just put the following lines in your bashrc to get the 256 colors:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;EXT_COLOR &lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; -ne &lt;span class=&quot;s2&quot;&gt;&amp;quot;\[\033[38;5;$1m\]&amp;quot;&lt;/span&gt;; &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# set a fancy prompt&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PS1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;`EXT_COLOR 172`[\u@\h \W]\$${NO_COLOUR} &amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Yay, I now have an orange prompt! I now need to write a script that will display useful information depending on the context. Displaying the status of the mercurial repository I am in might be my next step.&lt;/p&gt;
</description>
  <dc:date>2010-02-07T11:07-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/20069</guid>
  <title>We&#39;re happy to host the mercurial Sprint</title>
  <link>http://www.logilab.org/blogentry/20069</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://farm1.static.flickr.com/183/419945378_4ead41a76d_m.jpg&quot; class=&quot;align-left&quot; src=&quot;http://farm1.static.flickr.com/183/419945378_4ead41a76d_m.jpg&quot; /&gt;
&lt;p&gt;We&#39;re very happy to be hosting the next &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/Mercurial&quot;&gt;mercurial&lt;/a&gt; sprint in our brand new offices in central Paris. It is quite an honor to be chosen when the other contender was Google.&lt;/p&gt;
&lt;p&gt;So a bunch of mercurial developers are heading out to our offices this coming Friday to sprint for three days on mercurial. We use mercurial a lot here over at &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr&quot;&gt;Logilab&lt;/a&gt; and we also contribute a tool to visualize and manipulate a &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/Mercurial&quot;&gt;mercurial&lt;/a&gt; repository : &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview&quot;&gt;hgview&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To check out the things that we will be working on with the mercurial crew, check out the &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/1.5sprint&quot;&gt;program of the sprint&lt;/a&gt; on their wiki.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a sprint?&lt;/strong&gt; &amp;quot;A sprint (sometimes called a Code Jam or hack-a-thon) is a short time period (three to five days) during which software developers work on a particular chunk of functionality. &amp;quot;The whole idea is to have a focused group of people make progress by the end of the week,&amp;quot; explains Jeff Whatcott&amp;quot; [&lt;a class=&quot;reference&quot; href=&quot;http://www.itworld.com/open-source/69107/how-sponsor-open-source-sprint&quot;&gt;source&lt;/a&gt;]. For geographically distributed open source communities, it is also a way of physically meeting and working in the same room for a period of time.&lt;/p&gt;
&lt;p&gt;Sprinting is a practice that we encourage at Logilab, with &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; we organize as often as possible open sprints, which is an opportunity for users and developers to come and code with us. We even use the sprint format for some internal stuff.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;photo by&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/giovannijl-s_photohut/&quot;&gt;Sebastian Mary&lt;/a&gt; &lt;em&gt;under&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-sa/2.0/&quot;&gt;creative commons licence&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2010-02-02T10:30-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/19912</guid>
  <title>hgview 1.2.0 released</title>
  <link>http://www.logilab.org/blogentry/19912</link>
  <description>&lt;p&gt;Here is at last the release of the version &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/1.2.0&quot;&gt;1.2.0&lt;/a&gt; of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview&quot;&gt;hgview&lt;/a&gt;.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/19894?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/19894?vid=download&quot; style=&quot;width: 450px;&quot; /&gt;
&lt;p&gt;In a nutshell, this release includes:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;a basic support for &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/MqExtension&quot;&gt;mq&lt;/a&gt; extension,&lt;/li&gt;
&lt;li&gt;a basic support for &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/BfilesExtension&quot;&gt;hg-bfiles&lt;/a&gt; extension,&lt;/li&gt;
&lt;li&gt;working directory is now displayed as a node of the graph (if there are local modifications of course),&lt;/li&gt;
&lt;li&gt;it&#39;s now possible to display only the subtree from a given revision (a bit like &lt;tt class=&quot;docutils literal&quot;&gt;hg log &lt;span class=&quot;pre&quot;&gt;-f&lt;/span&gt;&lt;/tt&gt;)&lt;/li&gt;
&lt;li&gt;it&#39;s also possible to activate an annotate view (make navigation slower however),&lt;/li&gt;
&lt;li&gt;several improvements in the graph filling and rendering mecanisms,&lt;/li&gt;
&lt;li&gt;I also added toolbar icons for the search and goto &amp;quot;quickbars&amp;quot; so they are not &amp;quot;hidden&amp;quot; any more to the one reluctant to user manuals,&lt;/li&gt;
&lt;li&gt;it&#39;s now possible to go directly to the common ancestor of 2 revisions,&lt;/li&gt;
&lt;li&gt;when on a merge node, it&#39;s now possible to choose the parent the diff is computed against,&lt;/li&gt;
&lt;li&gt;make search also search in commit messages (it used to search only in diff contents),&lt;/li&gt;
&lt;li&gt;and several bugfixes of course.&lt;/li&gt;
&lt;/ul&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;Notes:&lt;/dt&gt;
&lt;dd&gt;there are &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/card/LogilabDebianRepository&quot;&gt;packages&lt;/a&gt; for debian lenny, squeeze and sid, and for ubuntu hardy, interpid, jaunty and karmic. However, for lenny and hardy, provided packages won&#39;t work on pure distribs since hgview 1.2 depends on mercurial 1.1. Thus for these 2 distributions, packages will only work if you have installed backported mercurial packages.&lt;/dd&gt;
&lt;/dl&gt;
</description>
  <dc:date>2010-01-21T18:13-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/19904</guid>
  <title>New supported repositories for Debian and Ubuntu</title>
  <link>http://www.logilab.org/blogentry/19904</link>
  <description>&lt;p&gt;For the release of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/&quot;&gt;hgview&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/1.2.0&quot;&gt;1.2.0&lt;/a&gt; in our Karmic Ubuntu repository, we would like to announce that we are now going to generate packages for the following distributions :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Debian Lenny (because it&#39;s stable)&lt;/li&gt;
&lt;li&gt;Debian Sid (because it&#39;s the dev branch)&lt;/li&gt;
&lt;li&gt;Ubuntu Hardy (because it has Long Term Support)&lt;/li&gt;
&lt;li&gt;Ubuntu Karmic (because it&#39;s the current stable)&lt;/li&gt;
&lt;li&gt;Ubuntu Lucid (because it&#39;s the next stable) - no repo yet, but soon...&lt;/li&gt;
&lt;/ul&gt;
&lt;img align=&quot;left&quot; alt=&quot;http://img.generation-nt.com/ubuntulogo_0080000000420571.png&quot; class=&quot;align-left&quot; src=&quot;http://img.generation-nt.com/ubuntulogo_0080000000420571.png&quot; /&gt;
&lt;p&gt;The old packages in the previously supported architectures are still accessible (etch, jaunty, intrepid), but new versions will not be generated for these repositories. Packages will be coming in as versions get released, if before that you need a package, give us a &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/Card/ContactUs&quot;&gt;shout&lt;/a&gt; and we&#39;ll see what we can do.&lt;/p&gt;
&lt;p&gt;For instructions on how to use the repositories for Ubuntu or Debian, go to the following page : &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/card/LogilabDebianRepository&quot;&gt;http://www.logilab.org/card/LogilabDebianRepository&lt;/a&gt;&lt;/p&gt;
</description>
  <dc:date>2010-01-21T17:14-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/19337</guid>
  <title>Open Source/Design Hardware</title>
  <link>http://www.logilab.org/blogentry/19337</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/19338?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/19338?vid=download&quot; /&gt;
&lt;p&gt;I have been doing free software since I discovered it existed. I bought an &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/5870&quot;&gt;OpenMoko&lt;/a&gt; some time ago, since I am interested in anything that is open, including artwork like books, music, movies and... hardware.&lt;/p&gt;
&lt;p&gt;I just learned about two lists, one at &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Open_source_hardware&quot;&gt;Wikipedia&lt;/a&gt; and another one at &lt;a class=&quot;reference&quot; href=&quot;http://blog.makezine.com/archive/2009/12/open_source_hardware_2009_-_the_def.html&quot;&gt;MakeOnline&lt;/a&gt;, but Google has &lt;a class=&quot;reference&quot; href=&quot;http://www.google.com/search?&amp;amp;q=openhardware&quot;&gt;more&lt;/a&gt;. Explore and enjoy!&lt;/p&gt;
</description>
  <dc:date>2009-12-13T15:32-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/19309</guid>
  <title>Solution to a common Mercurial task</title>
  <link>http://www.logilab.org/blogentry/19309</link>
  <description>&lt;p&gt;An interesting &lt;a class=&quot;reference&quot; href=&quot;http://www.selenic.com/pipermail/mercurial-devel/2009-December/thread.html&quot;&gt;question&lt;/a&gt; has just been sent by Greg Ward on the
&lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com&quot;&gt;Mercurial&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.selenic.com/pipermail/mercurial-devel&quot;&gt;devel mailing-list&lt;/a&gt; (as a funny coincidence, it happened
that I had to solve this problem a few days ago).&lt;/p&gt;
&lt;p&gt;Let me quote his message:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
here&#39;s my problem: imagine a customer is running software built from
changeset A, and we want to upgrade them to a new version, built from
changeset B.  So I need to know what bugs are fixed in B that were not
fixed in A.  I have already implemented a changeset/bug mapping, so I
can trivially lookup the bugs fixed by any changeset.  (It even handles
&amp;quot;ongoing&amp;quot; and &amp;quot;reverted&amp;quot; bugs in addition to &amp;quot;fixed&amp;quot;.)
&lt;/pre&gt;
&lt;p&gt;And he gives an example of situation where a tricky case may be found:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
                +--- 75 -- 78 -- 79 ------------+
               /                                 \
              /     +-- 77 -- 80 ---------- 84 -- 85
             /     /                        /
0 -- ... -- 74 -- 76                       /
                   \                      /
                    +-- 81 -- 82 -- 83 --+
&lt;/pre&gt;
&lt;div class=&quot;section&quot; id=&quot;so-what-is-the-problem&quot;&gt;
&lt;h3&gt;&lt;a&gt;So what is the problem?&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Imagine the lastest distributed stable release is built on rev 81. Now,
I need to publish a new bugfix release based on this latest stable
version, including every changeset that is a bugfix, but that have not
yet been applied at revision 81.&lt;/p&gt;
&lt;p&gt;So the first problem we need to solve is answering: what are the
revisions ancestors of revision 85 that are not ancestor of revision
81?&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;command-line-solution&quot;&gt;
&lt;h4&gt;&lt;a&gt;Command line solution&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Using hg commands, the solution is proposed by Steve Losh:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
hg log --template &#39;{rev}\n&#39; --rev 85:0 --follow --prune 81
&lt;/pre&gt;
&lt;p&gt;or better, as suggested by Matt:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
hg log -q --template &#39;{rev}\n&#39; --rev 85:0 --follow --prune 81
&lt;/pre&gt;
&lt;p&gt;The second is better since it does only read the index, and thus is
much faster. But on big repositories, this command remains quite slow
(with Greg&#39;s situation, a repo of more than 100000 revisions, the
command takes more than 2 minutes).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;python-solution&quot;&gt;
&lt;h4&gt;&lt;a&gt;Python solution&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Using Python, one may think about using &lt;cite&gt;revlog.nodesbetween()&lt;/cite&gt;, but it
won&#39;t work as wanted here, not listing revisions 75, 78 and 79.&lt;/p&gt;
&lt;p&gt;On the mailing list, Matt gave the most simple and efficient solution:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;cl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;changelog&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ancestors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;81&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ancestors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;85&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;revs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;idea-for-a-new-extension&quot;&gt;
&lt;h3&gt;&lt;a&gt;Idea for a new extension&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Using this simple python code, it should be easy to write a nice &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com&quot;&gt;Mercurial&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/WritingExtensions&quot;&gt;extension&lt;/a&gt; (which could be named &lt;tt class=&quot;docutils literal&quot;&gt;missingrevisions&lt;/tt&gt;) to do this job.&lt;/p&gt;
&lt;p&gt;Then, it should be interesting to also implement some filtering
feature.  For example, if there are simple conventions used in commit
messages, eg. using something like &lt;cite&gt;&amp;quot;[fix #1245]&amp;quot;&lt;/cite&gt; or &lt;cite&gt;&amp;quot;[close
#1245]&amp;quot;&lt;/cite&gt; in the commit message when the changeset is a fix for a bug
listed in the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb-forge&quot;&gt;bugtracker&lt;/a&gt;, then we may type commands like:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
hg missingrevs REV -f bugfix
&lt;/pre&gt;
&lt;p&gt;or:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
hg missingrevs REV -h HEADREV -f bugfix
&lt;/pre&gt;
&lt;p&gt;to find bugfix revisions ancestors of HEADREV that are not ancestors
of REV.&lt;/p&gt;
&lt;p&gt;With filters (&lt;cite&gt;bugfix&lt;/cite&gt; here) may be configurables in &lt;cite&gt;hgrc&lt;/cite&gt; using regexps.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-12-10T12:09-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/19260</guid>
  <title>pylint bug day report</title>
  <link>http://www.logilab.org/blogentry/19260</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://farm1.static.flickr.com/85/243306920_6a12bb48c7.jpg&quot; class=&quot;align-right&quot; src=&quot;http://farm1.static.flickr.com/85/243306920_6a12bb48c7.jpg&quot; style=&quot;height: 150px;&quot; /&gt;
&lt;p&gt;The first pylint bug day took place on wednesday 25th. Four members of the Logilab crew and
two other people spent the day working on pylint.&lt;/p&gt;
&lt;p&gt;Several patches submitted before the bug day were processed and some tickets
were closed.&lt;/p&gt;
&lt;p&gt;Charles Hébert added James Lingard&#39;s patches for string formatting and is
working on several improvements. Vincent Férotin submitted a patch for simple
message listings.  Sylvain Thenault fixed significant inference bugs in astng (an
underlying module of pylint managing the syntax tree).  Émile Anclin began a
major astng refactoring to take advantage of new python2.6 functionality.  For
my part, I made several improvements to the test suite. I applied James Lingard
patches for &lt;tt class=&quot;docutils literal&quot;&gt;++&lt;/tt&gt; operator and generalised it to &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;--&lt;/span&gt;&lt;/tt&gt; too. I also added a new
checker for function call arguments submitted by James Lingard once again.
Finally I improved the message filtering of the --errors-only options.&lt;/p&gt;
&lt;p&gt;We thank Maarten ter Huurne, Vincent Férotin for their participation and of course
James Lingard for submitting numerous patches.&lt;/p&gt;
&lt;p&gt;Another pylint bug day will be held in a few months.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;image under&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.0/&quot;&gt;creative commons&lt;/a&gt; &lt;em&gt;by&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/deadmike/&quot;&gt;smccann&lt;/a&gt;&lt;/p&gt;
</description>
  <dc:date>2009-12-04T15:56-01:00</dc:date>
  <dc:creator>Pierre-Yves David</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/19136</guid>
  <title>Resume of the first Coccinelle users day</title>
  <link>http://www.logilab.org/blogentry/19136</link>
  <description>&lt;div class=&quot;section&quot; id=&quot;a-matching-and-transformation-tool-for-systems-code&quot;&gt;
&lt;h3&gt;&lt;a&gt;A matching and transformation tool for systems code&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Coccinelle&#39;s goal is to ease code maintenance by first revealing code
smells based on design patterns and second easing an API (Application
Programming Interface) change for a heavily used library. Coccinelle
can thus be seen as two tools inside one. The first one matches patterns,
the second applies transformations.  However facing such a big problem,
the project needed to define boundaries in order to increase chances of
success. The building motivation was thus to target the Linux kernel. This
choice has implied a tool working on the C programming language before
the preprocessor step. Moreover the Linux code base adds interesing
constraints as it is huge, contains many possible configurations
depending on C macros, may contain many bugs and evolves a lot. What
was the Coccinelle solution for easing the kernel maintenance?&lt;/p&gt;
&lt;img align=&quot;left&quot; alt=&quot;http://farm1.static.flickr.com/151/398536506_57df539ccf_m.jpg&quot; class=&quot;align-left&quot; src=&quot;http://farm1.static.flickr.com/151/398536506_57df539ccf_m.jpg&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;generating-diff-files-from-the-semantic-patch-langage&quot;&gt;
&lt;h3&gt;&lt;a&gt;Generating diff files from the semantic patch langage&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Linux community reads lot of diff files for following the kernel
evolution. As a consequence the diff file syntax is widely spread and
commonly understood. However this syntax concerns a particular change
between two files, its does not allow to match a generic pattern.&lt;/p&gt;
&lt;p&gt;The Coccinelle&#39;s solution is to build its own langage allowing to declare
rules describing a code pattern and a possible transformation.  This
langage is the Semantic Patch Langage (SmPL), based on the declarative
approach of the diff file syntax. It allows to propagate a change rule to
many files by generating diff files. Then those results can be directly
applied by using the patch command but most of the time they will be
reviewed and may be slightly adapted to the programmer&#39;s need.&lt;/p&gt;
&lt;p&gt;A Coccinelle&#39;s rule is made of two parts: metavariable declaration and a
code pattern match followed by a possible transformation.  A metavariable
means a control flow variable, its possibles names inside the program
do not matter. Then the code pattern will describe a particular control
flow in the program by using the C and SmPL syntaxes manipulating the
metavariables. As a result, Coccinelle succeeds to generate diff files
because it works on the C program control flow.&lt;/p&gt;
&lt;p&gt;A complete SmPL description will not be given here because it can be found
in the Coccinelle&#39;s documentation. However a brief introduction will be
made on a rule declaration. The metavariable part will look like this:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;#64;&amp;#64;
expression E;
constant C;
&amp;#64;&amp;#64;
&lt;/pre&gt;
&lt;p&gt;&#39;expression&#39; means a variable or the result of a function. However
&#39;constant&#39; means a C constant. Then for negating the result of an and
operation between an expression and a constant instead of negating the
expression first, the transformation part will be:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
- !E &amp;amp; C
+ !(E &amp;amp; C)
&lt;/pre&gt;
&lt;p&gt;A file containing several rules like that will be called a semantic
patch. It will be applied by using the Coccinelle &#39;spatch&#39; command that
will generate a change written in the diff file syntax each time the above
pattern is matched. The next section will illustrate this way of work.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.simplehelp.net/wp-images/icons/topic_linux.jpg&quot; class=&quot;align-right&quot; src=&quot;http://www.simplehelp.net/wp-images/icons/topic_linux.jpg&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;a-working-example-on-the-linux-kernel-2-6-30&quot;&gt;
&lt;h3&gt;&lt;a&gt;A working example on the Linux kernel 2.6.30&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can download and install Coccinelle &#39;spatch&#39; command from its
website: &lt;a class=&quot;reference&quot; href=&quot;http://coccinelle.lip6.fr/&quot;&gt;http://coccinelle.lip6.fr/&lt;/a&gt; if you want to execute the following
example. Let&#39;s first consider the following structure with accessors in
the header &#39;device.h&#39;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;driver_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;inline&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;dev_get_drvdata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dev&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;driver_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;inline&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;dev_set_drvdata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;dev&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;driver_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;it imitates the 2.6.30 kernel header &#39;include/linux/device.h&#39;. Let&#39;s now
consider the following client code that does not make use of the accessors:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;assert.h&amp;gt;&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#include &amp;quot;device.h&amp;quot;&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;driver_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;driver_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;driver_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;driver_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once this code saved in the file &#39;fake_device.c&#39;, we can check that the
code compiles and runs by:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gcc fake_device.c &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ./a.out
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We will now create a semantic patch &#39;device_data.cocci&#39; trying to add the
getter accessor with this first rule:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;#64;&amp;#64;
struct device dev;
&amp;#64;&amp;#64;
- dev.driver_data
+ dev_get_drvdata(&amp;amp;dev)
&lt;/pre&gt;
&lt;p&gt;The &#39;spatch&#39; command is then run by:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;spatch -sp_file device_data.cocci fake_device.c
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;producing the following change in a diff file:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
-    devs[0].driver_data = (void*)(&amp;amp;data[0]);
-    a = devs[0].driver_data;
+    dev_get_drvdata(&amp;amp;devs[0]) = (void*)(&amp;amp;data[0]);
+    a = dev_get_drvdata(&amp;amp;devs[0]);
&lt;/pre&gt;
&lt;p&gt;which illustrates the great Coccinelle&#39;s way of work on program flow control.
However the transformation has also matched code where the setter accessor
should be used. We will thus add a rule above the previous one, the semantic
patch becomes:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;#64;&amp;#64;
struct device dev;
expression data;
&amp;#64;&amp;#64;
- dev.driver_data = data
+ dev_set_drvdata(&amp;amp;dev, data)

&amp;#64;&amp;#64;
struct device dev;
&amp;#64;&amp;#64;
- dev.driver_data
+ dev_get_drvdata(&amp;amp;dev)
&lt;/pre&gt;
&lt;p&gt;Running the command again will produce the wanted output:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ spatch -sp_file device_data.cocci fake_device.c
-    devs[0].driver_data = (void*)(&amp;amp;data[0]);
-    a = devs[0].driver_data;
+    dev_set_drvdata(&amp;amp;devs[0], (void *)(&amp;amp;data[0]));
+    a = dev_get_drvdata(&amp;amp;devs[0]);
&lt;/pre&gt;
&lt;p&gt;It is important to write the setter rule before the getter rule else
the getter rule will be applied first to the whole file.&lt;/p&gt;
&lt;p&gt;At this point our semantic patch is still incomplete because it does
not work on &#39;device&#39; structure pointers. By using the same logic,
let&#39;s add it to the &#39;device_data.cocci&#39; semantic patch:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;#64;&amp;#64;
struct device dev;
expression data;
&amp;#64;&amp;#64;
- dev.driver_data = data
+ dev_set_drvdata(&amp;amp;dev, data)

&amp;#64;&amp;#64;
struct device * dev;
expression data;
&amp;#64;&amp;#64;
- dev-&amp;gt;driver_data = data
+ dev_set_drvdata(dev, data)

&amp;#64;&amp;#64;
struct device dev;
&amp;#64;&amp;#64;
- dev.driver_data
+ dev_get_drvdata(&amp;amp;dev)

&amp;#64;&amp;#64;
struct device * dev;
&amp;#64;&amp;#64;
- dev-&amp;gt;driver_data
+ dev_get_drvdata(dev)
&lt;/pre&gt;
&lt;p&gt;Running Coccinelle again:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;spatch -sp_file device_data.cocci fake_device.c
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;will add the remaining transformations for the &#39;fake_device.c&#39; file:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
-    dev_ptr-&amp;gt;driver_data = (void*)(&amp;amp;data[1]);
-    b = dev_ptr-&amp;gt;driver_data;
+    dev_set_drvdata(dev_ptr, (void *)(&amp;amp;data[1]));
+    b = dev_get_drvdata(dev_ptr);
&lt;/pre&gt;
&lt;p&gt;but a new problem appears: the &#39;device.h&#39; header is also modified.
We meet here an important point of the Coccinelle&#39;s philosophy described
in the first section. &#39;spatch&#39; is a tool to ease code maintenance by
propagating a code pattern change to many files. However the resulting
diff files are supposed to be reviewed and in our case the unwanted
modification should be removed. Note that it would be possible to
avoid the &#39;device.h&#39; header modification by using SmPL syntax but the
explanation would be too much for a starting tutorial.  Instead,
we will simply cut the unwanted part:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ spatch -sp_file device_data.cocci fake_device.c | cut -d $&#39;\n&#39; -f 16-34
&lt;/pre&gt;
&lt;p&gt;This result will now be kept in a diff file by moreover asking &#39;spatch&#39; to
produce it for the current working directory:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ spatch -sp_file device_data.cocci -patch &amp;quot;&amp;quot; fake_device.c | \
cut -d $&#39;\n&#39; -f 16-34 &amp;gt; device_data.patch
&lt;/pre&gt;
&lt;p&gt;It is now time to apply the change for getting a working C code using
accessors:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ patch -p1 &amp;lt; device_data.patch
&lt;/pre&gt;
&lt;p&gt;The final result for &#39;fake_device.c&#39; should be:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;assert.h&amp;gt;&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#include &amp;quot;device.h&amp;quot;&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;dev_set_drvdata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]));&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dev_get_drvdata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;devs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;dev_set_drvdata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]));&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dev_get_drvdata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev_ptr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Finally, we can test that the code compiles and runs:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
.. sourcecode:: sh
&lt;/pre&gt;
&lt;blockquote&gt;
$ gcc fake_device.c &amp;amp;&amp;amp; ./a.out&lt;/blockquote&gt;
&lt;p&gt;The semantic patch is now ready to be used on the Linux&#39;s 2.6.30 kernel:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.bz2
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;tar xjf linux-2.6.30.tar.bz2
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;spatch -sp_file device_data.cocci -dir linux-2.6.30/drivers/net/ &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &amp;gt; device_drivers_net.patch
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;wc -l device_drivers_net.patch
642
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You may also try the &#39;drivers/ieee1394&#39; directory.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://coccinelle.lip6.fr/img/lip6.jpg&quot; class=&quot;align-right&quot; src=&quot;http://coccinelle.lip6.fr/img/lip6.jpg&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusion&quot;&gt;
&lt;h3&gt;&lt;a&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Coccinelle is made of around 60 thousands lines of Objective Caml. As
illustrated by the above example on the linux kernel, the &#39;spatch&#39; command
succeeds to ease code maintenance. For the Coccinelle&#39;s team working on
the kernel code base, a semantic patch is usually around 100 lines and
will generated diff files to sometimes hundred of files. Moreover the
processing is rather fast, the average time per file is said to be 0.7s.&lt;/p&gt;
&lt;p&gt;Two tools using the &#39;spatch&#39; engine have already been built:
&#39;spdiff&#39; and &#39;herodotos&#39;. With the first one you could almost avoid to learn
the SmPL language because the idea is to generate a semantic patch
by looking to transformations between files pairs. The second allows
to correlate defects over software versions once the corresponding
code smells have been described in SmPL.&lt;/p&gt;
&lt;p&gt;One of the Coccinelle&#39;s problem is to not being easily extendable to
another language as the engine was designed for analyzing control flows
on C programs. The C++ langage may be added but required obviously lot
of work. It would be great to also have such a tool on dynamic languages
like Python.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;image under&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.0/&quot;&gt;creative commons&lt;/a&gt; &lt;em&gt;by&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/remi_vannier&quot;&gt;Rémi Vannier&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-11-30T12:05-01:00</dc:date>
  <dc:creator>Andre Espaze</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/19037</guid>
  <title>pylint bug day next wednesday!</title>
  <link>http://www.logilab.org/blogentry/19037</link>
  <description>&lt;p&gt;Remember that the first pylint bug day will be held on wednesday, november 25, from around 8am to 8pm in the Paris (France) time zone.&lt;/p&gt;
&lt;p&gt;We&#39;ll be a few people at Logilab and hopefuly a lot of other guys all around the world, trying to make pylint better.&lt;/p&gt;
&lt;p&gt;Join us on the #public conference room of conference.jabber.logilab.org, or if you prefer using an IRC client, join #public on irc.logilab.org which is a gateway to the jabber forum. And if you&#39;re in Paris, come to work with us in our office.&lt;/p&gt;
&lt;p&gt;People willing to help but without knowledge of pylint internals are welcome, it&#39;s the perfect occasion to learn a lot about it, and to be able to hack on pylint in the future!&lt;/p&gt;
</description>
  <dc:date>2009-11-23T17:01-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/18838</guid>
  <title>First contact with pupynere</title>
  <link>http://www.logilab.org/blogentry/18838</link>
  <description>&lt;p&gt;I spent some time this week evaluating &lt;a class=&quot;reference&quot; href=&quot;http://dealmeida.net/projects/pupynere&quot;&gt;Pupynere&lt;/a&gt;, the PUre PYthon NEtcdf REader written by Roberto De Almeida. I see several advantages in pupynere.&lt;/p&gt;
&lt;p&gt;First it&#39;s a pure Python module with no external dependency. It doesn&#39;t even depend on the &lt;a class=&quot;reference&quot; href=&quot;http://www.unidata.ucar.edu/software/netcdf/&quot;&gt;NetCDF&lt;/a&gt; lib and it is therefore very easy to deploy.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.unidata.ucar.edu/software/netcdf/netcdf1_sm.png&quot; class=&quot;align-right&quot; src=&quot;http://www.unidata.ucar.edu/software/netcdf/netcdf1_sm.png&quot; /&gt;
&lt;p&gt;Second, it offers the same interface as &lt;cite&gt;Scientific Python&lt;/cite&gt;&#39;s NetCDF bindings which makes transitioning from one module to another very easy.&lt;/p&gt;
&lt;p&gt;Third pupynere is being integrated into &lt;a class=&quot;reference&quot; href=&quot;http://www.scipy.org/&quot;&gt;Scipy&lt;/a&gt; as the &lt;tt class=&quot;docutils literal&quot;&gt;scypi.io.netcdf&lt;/tt&gt; module. Once integrated, this could ensure a wide adoption by the python community.&lt;/p&gt;
&lt;p&gt;Finally it&#39;s easy to dig in this clear and small code base of about 600 lines. I have just sent several fixes and bug reports to the author.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://docs.scipy.org/doc/_static/scipyshiny_small.png&quot; class=&quot;align-right&quot; src=&quot;http://docs.scipy.org/doc/_static/scipyshiny_small.png&quot; /&gt;
&lt;p&gt;However pupynere isn&#39;t mature yet. First it seems pupynere has been only used for simple cases so far. Many common cases are broken. Moreover there is no support for new NetCDF formats such as long-NetCDF and NetCDF4, and important features such as file update are still missing. In addition, The lack of a test suite is a serious issue. In my opinion, various bugs could already have been detected and fixed with simple unit tests. Contributions would be much more
comfortable with the safety net offered by a test suite. I am not certain
that the fixes and improvements I made this week did not introduce regressions.&lt;/p&gt;
&lt;p&gt;To conclude, pupynere seems too young for production use. But I invite people
to try it and provide feedback and fixes to the author. I&#39;m looking forward to using this project in production in the future.&lt;/p&gt;
</description>
  <dc:date>2009-11-06T17:36-01:00</dc:date>
  <dc:creator>Pierre-Yves David</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/18781</guid>
  <title>First Pylint Bug Day on Nov 25th, 2009 !</title>
  <link>http://www.logilab.org/blogentry/18781</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/18785?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/18785?vid=download&quot; /&gt;
&lt;p&gt;Since we don&#39;t stop being overloaded here at Logilab, and we&#39;ve got some encouraging feedback after the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/18020&quot;&gt;&amp;quot;Pylint needs you&amp;quot;&lt;/a&gt; post, we decided to take some time to introduce more &amp;quot;community&amp;quot; in &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;pylint&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And the easiest thing to do, rather sooner than later, is a irc/jabber synchronized bug day, which will be held on &lt;strong&gt;Wednesday november 25&lt;/strong&gt;. We&#39;re based in France, so main developpers will be there between around 8am and 19pm UTC+1.
If a few of you guys are around Paris at this time and wish to come at Logilab to sprint with us, contact us and we&#39;ll try to make this possible.&lt;/p&gt;
&lt;p&gt;The focus for this bug killing day could be:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;using logilab.org tracker : getting an account, submitting tickets, triaging existing tickets...&lt;/li&gt;
&lt;li&gt;using mercurial to develop pylint / astng&lt;/li&gt;
&lt;li&gt;guide people in the code so they&#39;re able to fix simple bugs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We will of course also try to kill a hella-lotta bugs, but the main idea is to help whoever wants to contribute to pylint... and plan for the next bug-killing day !&lt;/p&gt;
&lt;p&gt;As we are in the process of moving to another place, we can&#39;t organize a sprint yet, but we should have some room available for the next time, so stay tuned :)&lt;/p&gt;
</description>
  <dc:date>2009-10-21T15:43-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/18729</guid>
  <title>Projman 0.14.0 includes a Graphical User Interface</title>
  <link>http://www.logilab.org/blogentry/18729</link>
  <description>&lt;div class=&quot;section&quot; id=&quot;introduction&quot;&gt;
&lt;h3&gt;&lt;a&gt;Introduction&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/projman&quot;&gt;Projman&lt;/a&gt; is a project manager. With projman 0.14.0, the first sketch of a GUI
has been updated, and important functionalities added. You can now easily see
and edit task dependencies and test the resulting scheduling. Furthermore,
a &lt;strong&gt;begin-after-end-previous&lt;/strong&gt; constraint has been added which should really
simplify the edition of the scheduling.&lt;/p&gt;
&lt;p&gt;The GUI can be used the two following ways:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ projman-gui
$ projman-gui &amp;lt;path/to/project.xml&amp;gt;
&lt;/pre&gt;
&lt;p&gt;The file &lt;em&gt;&amp;lt;path/to/project.xml&amp;gt;&lt;/em&gt; is the well known main file of a projman project.
Starting &lt;strong&gt;projman-gui&lt;/strong&gt; with no &lt;em&gt;project.xml&lt;/em&gt; specified, or after opening
a project, you can open an existing project simply with &amp;quot;File-&amp;gt;Open&amp;quot;.
(For now, you can&#39;t create a new project with &lt;em&gt;projman-gui&lt;/em&gt;.)
You can edit the tasks and then save the modifications to the task file with
&amp;quot;File-&amp;gt;Save&amp;quot;.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/18731?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/18731?vid=download&quot; style=&quot;width: 450px;&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;the-project-tab&quot;&gt;
&lt;h3&gt;&lt;a&gt;The Project tab&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;em&gt;Project&lt;/em&gt;  tab shows simply the four needed files of a projman project for
resources, activities, tasks and schedule.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;resources&quot;&gt;
&lt;h3&gt;&lt;a&gt;Resources&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;em&gt;Resources&lt;/em&gt; tab presents the different resources:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;human resources&lt;/li&gt;
&lt;li&gt;resource roles describing the different roles that resources can play&lt;/li&gt;
&lt;li&gt;Different calendars for different resources with their &amp;quot;offdays&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;activities&quot;&gt;
&lt;h3&gt;&lt;a&gt;Activities&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For now, the &lt;em&gt;Activities&lt;/em&gt; tab is not implemented. It should show the planning of
the activities for each resource and the progress of the project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;tasks&quot;&gt;
&lt;h3&gt;&lt;a&gt;Tasks&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;em&gt;Tasks&lt;/em&gt; tab is for now the most important one; it shows a tree view of the
task hierarchy, and for each task:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the title of the task,&lt;/li&gt;
&lt;li&gt;the role for that task,&lt;/li&gt;
&lt;li&gt;the load (time in days),&lt;/li&gt;
&lt;li&gt;the scheduling type,&lt;/li&gt;
&lt;li&gt;the list of the constraints for the scheduling,&lt;/li&gt;
&lt;li&gt;and the description of the task,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;each of which can be edited. You easily can drag and drop tasks inside the task
tree and add and delete tasks and constraints.&lt;/p&gt;
&lt;p&gt;See the attached screenshot of the projman-gui task panel.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;scheduling&quot;&gt;
&lt;h3&gt;&lt;a&gt;Scheduling&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In the &lt;em&gt;Scheduling&lt;/em&gt; tab you can simply test your scheduling by clicking
&amp;quot;START&amp;quot;. If you expect the scheduling to take a longer time, you can modify
the maximum time of searching a solution.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;known-bugs&quot;&gt;
&lt;h3&gt;&lt;a&gt;Known bugs&lt;/a&gt;&lt;/h3&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;The &lt;strong&gt;begin-after-end-previous&lt;/strong&gt; constraint does not work for a task
having subtasks.&lt;/li&gt;
&lt;li&gt;Deleting a task doesn&#39;t check for depending tasks, so scheduling won&#39;t
work anymore.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-10-19T15:39-01:00</dc:date>
  <dc:creator>Emile Anclin</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/18211</guid>
  <title>hgview 1.1.0 released</title>
  <link>http://www.logilab.org/blogentry/18211</link>
  <description>&lt;p&gt;I am pleased to announce the latest release of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/1.1.0&quot;&gt;hgview 1.1.0&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;what-is-it&quot;&gt;
&lt;h3&gt;&lt;a&gt;What is it?&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For the ones from the back of the classroom near the radiator, let me
remind you that &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview&quot;&gt;hgview&lt;/a&gt; is a very helpful tool for daily work using
the excellent DVCS &lt;a class=&quot;reference&quot; href=&quot;http://www.selenic.com/mercurial&quot;&gt;Mercurial&lt;/a&gt; (which we heavily use at &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr&quot;&gt;Logilab&lt;/a&gt;). It
allows to easily and visually navigate your hg repository revision
graphlog. It is written in &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org&quot;&gt;Python&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.riverbankcomputing.co.uk/software/pyqt/intro&quot;&gt;pyqt&lt;/a&gt;.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/18210?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/18210?vid=download&quot; style=&quot;width: 450px;&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;what-s-new&quot;&gt;
&lt;h3&gt;&lt;a&gt;What&#39;s new&lt;/a&gt;&lt;/h3&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;user can now configure colors used in the diff area (and they now
defaults to white on black)&lt;/li&gt;
&lt;li&gt;indicate current working directory position by a square node&lt;/li&gt;
&lt;li&gt;add many other configuration options (listed when typing &lt;cite&gt;hg help hgview&lt;/cite&gt;)&lt;/li&gt;
&lt;li&gt;removed &#39;hg hgview-options&#39; command in favor of &#39;hg help hgview&#39;&lt;/li&gt;
&lt;li&gt;add ability to choose which parent to diff with for merge nodes&lt;/li&gt;
&lt;li&gt;dramatically improved UI behaviour (shortcuts)&lt;/li&gt;
&lt;li&gt;improved help and make it accessible from the GUI&lt;/li&gt;
&lt;li&gt;make it possible not to display the diffstat column of the file list
(which can dramatically improve performances on big repositories)&lt;/li&gt;
&lt;li&gt;standalone application: improved command line options&lt;/li&gt;
&lt;li&gt;indicate working directory position in the graph&lt;/li&gt;
&lt;li&gt;add auto-reload feature (when the repo is modified due to a pull, a
commit, etc., hgview detects it, reloads the repo and updates the
graph)&lt;/li&gt;
&lt;li&gt;fix &lt;em&gt;many&lt;/em&gt; bugs, especially the file log navigator should now
display the whole graph&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;download-and-installation&quot;&gt;
&lt;h3&gt;&lt;a&gt;Download and installation&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The source code is available as a &lt;a class=&quot;reference&quot; href=&quot;http://ftp.logilab.org/pub/hgview/hgview-1.0.0.tar.gz&quot;&gt;tarball&lt;/a&gt;, or using our &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/cgi-bin/hgwebdir.cgi/&quot;&gt;public hg repository&lt;/a&gt; of course.&lt;/p&gt;
&lt;p&gt;To use it from the sources, you just have to add a line in your &lt;tt class=&quot;docutils literal&quot;&gt;.hgrc&lt;/tt&gt; file, in the &lt;cite&gt;[extensions]&lt;/cite&gt; section:&lt;/p&gt;
&lt;blockquote&gt;
hgext.hgview=/path/to/hgview/hgext/hgview.py&lt;/blockquote&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org&quot;&gt;Debian&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt; users can also easily install hgview (and Logilab other free software tools) using our &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/card/LogilabDebianRepository&quot;&gt;deb package repositories&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-09-25T15:16-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/18020</guid>
  <title>Pylint a besoin de vous</title>
  <link>http://www.logilab.org/blogentry/18020</link>
  <description>&lt;p&gt;Après plusieurs mois au point mort ou presque, Sylvain a pu hier soir
publier des versions corrigeant un certain nombre de bogues dans
pylint et astng ([&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint/0.18.1&quot;&gt;1&lt;/a&gt;] et [&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng/0.19.1&quot;&gt;2&lt;/a&gt;]).&lt;/p&gt;
&lt;p&gt;Il n&#39;en demeure pas moins qu&#39;à Logilab, nous manquons de temps pour
faire baisser la pile de tickets ouverts dans le &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint/&quot;&gt;tracker&lt;/a&gt; de
pylint. Si vous jetez un œuil dans l&#39;onglet Tickets, vous y trouverez
un grand nombre de bogues en souffrance et de fonctionalités
indispensables (certaines peut-être un peu moins que d&#39;autres...) Il
est déjà possible de contribuer en utilisant &lt;a class=&quot;reference&quot; href=&quot;http://www.selenic.com/mercurial/&quot;&gt;mercurial&lt;/a&gt; pour fournir
des patches, ou en signalant des bogues (aaaaaaaaaarg ! encore des
tickets !) et certains s&#39;y sont mis, qu&#39;ils en soient remerciés.&lt;/p&gt;
&lt;p&gt;Maintenant, nous nous demandions ce que nous pourrions faire pour
faire avance Pylint, et nos premières idées sont :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;organiser un petit sprint de 3 jours environ&lt;/li&gt;
&lt;li&gt;organiser des jours de &amp;quot;tuage de ticket&amp;quot;, comme ça se pratique sur
différents projets OSS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mais pour que ça soit utile, nous avons besoin de votre aide. Voici donc
quelques questions :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;est-ce que vous participeriez à un sprint à Logilab (à Paris,
France), ce qui nous permettrait de nous rencontrer, de vous
apprendre plein de choses sur le fonctionnement de Pylint et de
travailler ensemble sur des tickets qui vous aideraient dans votre
travail ?&lt;/li&gt;
&lt;li&gt;si la France c&#39;est trop loin, où est-ce que ça vous arrangerait ?&lt;/li&gt;
&lt;li&gt;seriez-vous prêt à vous joindre à nous sur le serveur jabber de
Logilab ou sur IRC, pour participer à une chasse au ticket (à une
date à déterminer). Si oui, quel est votre degré de connaissance du
fonctionnement interne de Pylint et astng ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Vous pouvez répondre en commentant sur ce blog (pensez à vous
enregistrer en utilisant le lien en haut à droite sur cette page) ou
en écrivant à &lt;a class=&quot;reference&quot; href=&quot;mailto:sylvain.thenault&amp;#64;logilab.fr&quot;&gt;sylvain.thenault&amp;#64;logilab.fr&lt;/a&gt;. Si nous avons suffisamment
de réponses positives nous organiserons quelque chose.&lt;/p&gt;
</description>
  <dc:date>2009-09-17T09:20-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/17873</guid>
  <title>Using tempfile.mkstemp correctly</title>
  <link>http://www.logilab.org/blogentry/17873</link>
  <description>&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/tempfile.html#tempfile.mkstemp&quot;&gt;mkstemp&lt;/a&gt; function in the &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/tempfile.html&quot;&gt;tempfile&lt;/a&gt; module returns  a tuple of 2 values:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;an OS-level handle to an open file (as would be returned by os.open())&lt;/li&gt;
&lt;li&gt;the absolute pathname of that file.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I often see code using mkstemp only to get the filename to the temporary file, following a pattern such as:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;tempfile&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mkstemp&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;need_temp_storage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mkstemp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;some_commande --output &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This seems to be working fine, but there is a bug hiding in there. The bug will show up on Linux if you call this functions many time in a long running process, and on the first call on Windows. We have leaked a file descriptor.&lt;/p&gt;
&lt;p&gt;The first element of the tuple returned by &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/tempfile.html#tempfile.mkstemp&quot;&gt;mkstemp&lt;/a&gt; is typically an integer used to refer to a file by the OS. In Python, not closing a file is usually no big deal because the garbage collector will ultimately close the file for you, but here we are not dealing with file objects, but with OS-level handles. The interpreter sees an integer and has no way of knowing that the integer is connected to a file. On Linux, calling the above function repeatedly will eventually exhaust the available file descriptors. The program will stop with:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
IOError: [Errno 24] Too many open files: &#39;/tmp/tmpJ6g4Ke&#39;
&lt;/pre&gt;
&lt;p&gt;On Windows, it is not possible to remove a file which is still opened by another process, and you will get:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Windows Error [Error 32]
&lt;/pre&gt;
&lt;p&gt;Fixing the above function requires closing the file descriptor using os.close_():&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;tempfile&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mkstemp&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;need_temp_storage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mkstemp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;some_commande --output &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;temp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you need your process to write directly in the temporary file, you don&#39;t need to call os.write_(fd, data). The function os.fdopen_(fd) will return a Python file object using the same file descriptor. Closing that file object will close the OS-level file descriptor.&lt;/p&gt;
</description>
  <dc:date>2009-09-10T09:40-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/13892</guid>
  <title>You can now register on our sites</title>
  <link>http://www.logilab.org/blogentry/13892</link>
  <description>&lt;p&gt;With the new version of &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; deployed on our &amp;quot;public&amp;quot; sites, we would like to welcome a new (much awaited) functionality : you can now register directly on our websites. Getting an account with give you access to a bunch of functionalities :&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://farm1.static.flickr.com/53/148921611_eadce4f5f5_m.jpg&quot; class=&quot;align-right&quot; src=&quot;http://farm1.static.flickr.com/53/148921611_eadce4f5f5_m.jpg&quot; /&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;registering to a project&#39;s activity with get you automated email reports of what is happening on that project&lt;/li&gt;
&lt;li&gt;you can directly add tickets on projects instead of talking about it on the mailing lists&lt;/li&gt;
&lt;li&gt;you can bookmark content&lt;/li&gt;
&lt;li&gt;tag stuff&lt;/li&gt;
&lt;li&gt;and much more...&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is also a way of testing out the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; framework (in this case the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb-forge&quot;&gt;forge cube&lt;/a&gt;) which you can take home and host yourself (&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/card/LogilabDebianRepository&quot;&gt;debian&lt;/a&gt; recommended). Just click on the &amp;quot;register&amp;quot; link on the top right, or &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/register&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Photo by&lt;/em&gt;  &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/people/wa7son/&quot;&gt;wa7son&lt;/a&gt; &lt;em&gt;under&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/&quot;&gt;creative commons&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2009-09-03T17:43-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/10055</guid>
  <title>New pylint/astng release, but... pylint needs you !</title>
  <link>http://www.logilab.org/blogentry/10055</link>
  <description>&lt;p&gt;After several months with no time to fix/enhance pylint beside answering email and filing tickets, I&#39;ve finally tackled some tasks yesterday night to publish bug fixes releases ([&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint/0.18.1&quot;&gt;1&lt;/a&gt;] and [&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng/0.19.1&quot;&gt;2&lt;/a&gt;]).&lt;/p&gt;
&lt;p&gt;The problem is that we don&#39;t have enough free time at Logilab to lower the number of tickets in pylint tracker &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint/&quot;&gt;page&lt;/a&gt; .
If you take a look at the ticket tab, you&#39;ll see a lot of pendings bug and must-have features (well, and some other less necessary...).
You can already easily contribute thanks to the great &lt;a class=&quot;reference&quot; href=&quot;http://www.selenic.com/mercurial/&quot;&gt;mercurial&lt;/a&gt; dvcs, and some of you do, either by providing patches or by reporting bugs (more tickets, iiirk ! ;) Thank you all btw !!&lt;/p&gt;
&lt;p&gt;Now I was wondering what could be done to make pylint going further, and the first ideas which came to my mind was :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;do ~3 days sprint&lt;/li&gt;
&lt;li&gt;do some &#39;tickets killing&#39; days, as done in some popular oss projects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But for this to be useful, we need your support, so here are some questions for you:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;would you come to a sprint at Logilab (in Paris, France), so you can meet us, learn a lot about pylint, and work on tickets you wish to have in pylint?&lt;/li&gt;
&lt;li&gt;if France is too far away for most people, would you have another location to propose?&lt;/li&gt;
&lt;li&gt;would you be on jabber for a tickets killing day, providing it&#39;s ok with your agenda? if so, what&#39;s your knowledge of pylint/astng internals?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;you may answer by adding a comment to this blog (please register first by using the link at the top right of this page) or by mail to &lt;a class=&quot;reference&quot; href=&quot;mailto:sylvain.thenault&amp;#64;logilab.fr&quot;&gt;sylvain.thenault&amp;#64;logilab.fr&lt;/a&gt;. If we&#39;ve enough positive answers, we&#39;ll take the time to organize such a thing.&lt;/p&gt;
</description>
  <dc:date>2009-08-27T18:51-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9861</guid>
  <title>Looking for a Windows Package Manager</title>
  <link>http://www.logilab.org/blogentry/9861</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9862?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9862?vid=download&quot; /&gt;
&lt;p&gt;As said in a previous &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/9860&quot;&gt;article&lt;/a&gt;, I am convinced that part of the motivation for
making package sub-systems like the Python one, which includes distutils,
setuptools, etc, is that Windows users and Mac users never had the chance to use
a tool that properly manages the configuration of their computer system. They
just do not know what it would be like if they had at least a good &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Package_management_system&quot;&gt;package
management system&lt;/a&gt; and do not miss it in their daily work.&lt;/p&gt;
&lt;p&gt;I looked for Windows package managers that claim to provide features similar to
Debian&#39;s dpkg+apt-get and here is what I found in alphabetical order.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;appsnap&quot;&gt;
&lt;h3&gt;&lt;a&gt;AppSnap&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://appsnap.genotrance.com/&quot;&gt;AppSnap&lt;/a&gt; is written in Python and uses wxPython, PyCurl and PyYAML. It is
packaged using Py2Exe, compressed with UPX and installed using NSIS.&lt;/p&gt;
&lt;p&gt;It has not seen activity in the svn or on its blog since the end of 2008.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;appupdater&quot;&gt;
&lt;h3&gt;&lt;a&gt;Appupdater&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.nabber.org/projects/appupdater/&quot;&gt;Appupdater&lt;/a&gt; provides functionality similar to apt-get or yum. It automates the
process of installing and maintaining up to date versions of programs. It claims
to be fully customizable and is licensed under the GPL.&lt;/p&gt;
&lt;p&gt;It seems under active development at SourceForge.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;qwinapt&quot;&gt;
&lt;h3&gt;&lt;a&gt;QWinApt&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/qwinapt/&quot;&gt;QWinApt&lt;/a&gt; is a &lt;a class=&quot;reference&quot; href=&quot;http://www.nongnu.org/synaptic/&quot;&gt;Synaptic&lt;/a&gt; clone written in C# that has not evolved since september 2007.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;winaptic&quot;&gt;
&lt;h3&gt;&lt;a&gt;WinAptic&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/winaptic/&quot;&gt;WinAptic&lt;/a&gt; is another &lt;a class=&quot;reference&quot; href=&quot;http://www.nongnu.org/synaptic/&quot;&gt;Synaptic&lt;/a&gt; clone written this time in Pascal that has not evolved since
the end of 2007.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;win-get&quot;&gt;
&lt;h3&gt;&lt;a&gt;Win-Get&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://windows-get.sourceforge.net/&quot;&gt;Win-get&lt;/a&gt; is an automated install system and software repository for Microsoft
Windows. It is similar to apt-get: it connects to a link repository, finds an
application and downloads it before performing the installation routine (silent
or standard) and deleting the install file.&lt;/p&gt;
&lt;p&gt;It is written in pascal and is set up as a SourceForge project, but not much has
been done lately.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;winlibre&quot;&gt;
&lt;h3&gt;&lt;a&gt;WinLibre&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.winlibre.com/en/&quot;&gt;WinLibre&lt;/a&gt; is a Windows free software distribution that provides a repository of
packages and a tool to automate and simplify their installation.&lt;/p&gt;
&lt;p&gt;WinLibre was selected for Google Summer of Code 2009.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;zeroinstall&quot;&gt;
&lt;h3&gt;&lt;a&gt;ZeroInstall&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://0install.net/&quot;&gt;ZeroInstall&lt;/a&gt; started as a &amp;quot;non-admin&amp;quot; package manager for Linux distributions and
is now extending its reach to &lt;a class=&quot;reference&quot; href=&quot;http://0install.net/install-windows.html&quot;&gt;work on windows&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusion&quot;&gt;
&lt;h3&gt;&lt;a&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I have not used any of these tools, the above is just the result of some time
spent searching the web.&lt;/p&gt;
&lt;p&gt;A more limited approach is to notify the user of the newer versions:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.app-get.com/&quot;&gt;App-Get&lt;/a&gt; will show you a list of your installed Applications. When an update
is available for one of them, it will highlighted and you will be able to
update the specific applications in seconds.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://puchisoft.com/GetIt/&quot;&gt;GetIt&lt;/a&gt; is not an application-getter/installer. When you want to install a
program, you can look it up in GetIt to choose which program to install from a
master list of all programs made available by the various apt-get clones.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The appupdater project also &lt;a class=&quot;reference&quot; href=&quot;http://www.nabber.org/projects/appupdater/compare.html&quot;&gt;compares&lt;/a&gt; itself to the programs automating the
installation of software on Windows.&lt;/p&gt;
&lt;p&gt;Some columists expect the creation of &lt;a class=&quot;reference&quot; href=&quot;http://www.maximumpc.com/article/columns/murphys_law_it_time_opensource_app_store&quot;&gt;application stores&lt;/a&gt; replicating the iPhone
one.&lt;/p&gt;
&lt;p&gt;I once read about a project to get the Windows kernel into the Debian
distribution, but can not find any trace of it... Remember that Debian is &lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org/ports/&quot;&gt;not
limited&lt;/a&gt; to the Linux kernel, so why not think about a very improbable
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;apt-get&lt;/span&gt; install &lt;span class=&quot;pre&quot;&gt;windows-vista&lt;/span&gt;&lt;/tt&gt; ?&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-07-31T15:01-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9860</guid>
  <title>The Configuration Management Problem</title>
  <link>http://www.logilab.org/blogentry/9860</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9863?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9863?vid=download&quot; /&gt;
&lt;p&gt;Today I felt like summing up my opinion on a topic that was discussed this year on
the Python mailing lists, at PyCon-FR, at EuroPython and EuroSciPy... packaging
software! Let us discuss the two main use cases.&lt;/p&gt;
&lt;p&gt;The first use case is to maintain computer systems in production. A trait of
production systems, is that they can not afford failures and are often deployed
on a large scale. It leaves little room for manually fixing problems. Either
the installation process works or the system fails. Reaching that level of
quality takes a lot of work.&lt;/p&gt;
&lt;p&gt;The second use case is to facilitate the life of software developers and computer
users by making it easy for them to give a try to new pieces of software without
much work.&lt;/p&gt;
&lt;p&gt;The first use case &lt;em&gt;has&lt;/em&gt; to be addressed as a &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Configuration_management&quot;&gt;configuration management&lt;/a&gt;
problem. There is no way around it. The best way I know of managing the
configuration of a computer system is called &lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt;. Its package format and its
tool chain provide a very extensive and efficient set of features for system
development and maintenance. Of course it is not perfect and there are missing
bits and open issues that could be tackled, like the dependencies between
hardware and software. For example, nothing will prevent you from installing on
your Debian system a version of a driver that conflicts with the version of the
chip found in your hardware. That problem could be solved, but I do not think
the Debian project is there yet and I do not count it as a reason to reject
Debian since I have not seen any other competitor at the level as Debian.&lt;/p&gt;
&lt;p&gt;The second use case is kind of a trap, for it concerns most computer users and
most of those users are either convinced the first use case has nothing in
common with their problem or convinced that the solution is easy and requires
little work.&lt;/p&gt;
&lt;p&gt;The situation is made more complicated by the fact that most of those users
never had the chance to use a system with proper package management tools. They
simply do not know the difference and do not feel like they are &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/9861&quot;&gt;missing&lt;/a&gt; when
using their system-that-comes-with-a-windowing-system-included.&lt;/p&gt;
&lt;p&gt;Since many software developers have never had to maintain computer systems in
production (often considered a lower sysadmin job) and never developed packages
for computer systems that are maintained in production, they tend to think that
the operating system and their software are perfectly decoupled. They have no
problem trying to create a new layer on top of existing operating systems and
transforming an operating system issue (managing software installation) into a
programming langage issue (see CPAN, Python eggs and so many others).&lt;/p&gt;
&lt;p&gt;Creating a sub-system specific to a language and hosting it on an operating
system works well as long as the language boundary is not crossed and there is
no competition between the sub-system and the system itself. In the Python
world, distutils, setuptools, eggs and the like more or less work with pure
Python code. They create a square wheel that was made round years ago by
dpkg+apt-get and others, but they help a lot of their users do something they
would not know how to do another way.&lt;/p&gt;
&lt;p&gt;A wall is quickly hit though, as the approach becomes overly complex as soon as
they try to depend on things that do not belong to their Python sub-system. What
if your application needs a database? What if your application needs to link to
libraries? What if your application needs to reuse data from or provide data to
other applications? What if your application needs to work on different
architectures?&lt;/p&gt;
&lt;p&gt;The software developers that never had to maintain computer systems in
production wish these tasks were easy. Unfortunately they are not easy and cannot be. As I said, there is no way around configuration management for the one
who wants a stable system. Configuration management requires both project
management work and software development work. One can have a system where
packaging software is less work, but that comes at the price of stability and
reduced functionnality and ease of maintenance.&lt;/p&gt;
&lt;p&gt;Since none of the two use cases will disappear any time soon, the only solution
to the problem is to share as much data as possible between the different tools
and let each one decide how to install software on his computer system.&lt;/p&gt;
&lt;p&gt;Some links to continue your readings on the same topic:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://cournape.wordpress.com/2009/05/25/the-every-linux-distribution-should-have-the-same-package-manager-fallacy/&quot;&gt;The every Linux distribution should have the same package manager fallacy&lt;/a&gt; by D. Cournapeau&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://cournape.wordpress.com/2009/04/01/python-packaging-a-few-observations-cabal-for-a-solution/&quot;&gt;Python Packaging: a few observations and a cabal for a solution&lt;/a&gt; by D. Cournapeau&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://tarekziade.wordpress.com/2009/07/24/words-on-distribute-distutils-pep-376-pep-386-pep-345/&quot;&gt;Words on distribute, distutils and PEP 376, 386, 345&lt;/a&gt; by Tarek Ziadé&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/9861&quot;&gt;Looking for a Windows Package Manager&lt;/a&gt; on Logilab&#39;s blog&lt;/li&gt;
&lt;/ul&gt;
</description>
  <dc:date>2009-07-31T13:54-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9853</guid>
  <title>EuroSciPy&#39;09 (part 1/2): The Need For Speed</title>
  <link>http://www.logilab.org/blogentry/9853</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9852?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9852?vid=download&quot; /&gt;
&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/&quot;&gt;EuroSciPy2009&lt;/a&gt; conference was held in Leipzig at the end of July and was
sponsored by Logilab and other companies. It started with three talks about speed.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;starving-cpus&quot;&gt;
&lt;h3&gt;&lt;a&gt;Starving CPUs&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In his keynote, Fransesc Alted talked about &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/talk/893&quot;&gt;starving CPUs&lt;/a&gt;. Thirty years back,
memory and CPU frequencies where about the same. Memory speed kept up for about
ten years with the evolution of CPU speed before falling behind. Nowadays,
memory is about a hundred times slower than the cache which is itself about
twenty times slower than the CPU. The direct consequence is that CPUs are
starving and spend many clock cycles waiting for data to process.&lt;/p&gt;
&lt;p&gt;In order to improve the performance of programs, it is now required to know
about the multiple layers of computer memory, from disk storage to CPU. The
common architecture will soon count six levels: mechanical disk, solid state
disk, ram, cache level 3, cache level 2, cache level 1.&lt;/p&gt;
&lt;p&gt;Using optimized array operations, taking striding into account, processing data
blocks of the right size and using compression to diminish the amount of data
that is transfered from one layer to the next are four techniques that go a long
way on the road to high performance. Compression algorithms like Blosc increase
throughput for they strike the right balance between being fast and providing
good compression ratios. Blosc compression will soon be available in &lt;a class=&quot;reference&quot; href=&quot;http://www.pytables.org/&quot;&gt;PyTables&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Fransesc also mentions the &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/numexpr/&quot;&gt;numexpr&lt;/a&gt; extension to &lt;a class=&quot;reference&quot; href=&quot;http://numpy.scipy.org/&quot;&gt;numpy&lt;/a&gt;, and its combination with
PyTables named tables.Expr, that nicely and easily accelerates the computation
of some expressions involving numpy arrays. In his list of references, Fransesc
cites Ulrich Drepper article &lt;a class=&quot;reference&quot; href=&quot;http://people.redhat.com/drepper/cpumemory.pdf&quot;&gt;What every programmer should know about memory&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;using-pypy-s-jit-for-science&quot;&gt;
&lt;h3&gt;&lt;a&gt;Using PyPy&#39;s JIT for science&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Maciej Fijalkowski started his talk with a general presentation of the &lt;a class=&quot;reference&quot; href=&quot;http://pypy.org/&quot;&gt;PyPy&lt;/a&gt;
framework. One uses PyPy to describe an interpreter in RPython, then generate
the actual interpreter code and its JIT.&lt;/p&gt;
&lt;p&gt;Since &lt;a class=&quot;reference&quot; href=&quot;http://pypy.org/&quot;&gt;PyPy&lt;/a&gt; is has become more of a framework to write interpreters than a
reimplementation of Python in Python, I suggested to change its misleading name to
something like &lt;cite&gt;gcgc the Generic Compiler for Generating Compilers&lt;/cite&gt;. Maciej
answered that there are discussions on the mailing list to split the project in
two and make the implementation of the Python interpreter distinct from the GcGc
framework.&lt;/p&gt;
&lt;p&gt;Maciej then focused his &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/talk/894&quot;&gt;talk&lt;/a&gt; on his recent effort to rewrite in RPython the part
of &lt;a class=&quot;reference&quot; href=&quot;http://numpy.scipy.org/&quot;&gt;numpy&lt;/a&gt; that exposes the underlying C library to Python. He says the benefits
of using PyPy&#39;s JIT to speedup that wrapping layer are already visible. He has
&lt;a class=&quot;reference&quot; href=&quot;http://morepypy.blogspot.com/2009/07/pypy-numeric-experiments.html&quot;&gt;details&lt;/a&gt; on the PyPy blog. Gaël Varoquaux added that David Cournapeau has
started working on making the C/Python split in numpy cleaner, which would
further ease the job of rewriting it in RPython.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;crosstwine-linker&quot;&gt;
&lt;h3&gt;&lt;a&gt;CrossTwine Linker&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Damien Diederen talked about his &lt;a class=&quot;reference&quot; href=&quot;http://www.euroscipy.org/talk/895&quot;&gt;work&lt;/a&gt; on &lt;a class=&quot;reference&quot; href=&quot;http://crosstwine.com/linker/&quot;&gt;CrossTwine Linker&lt;/a&gt; and compared it
with the many projects that are actively attacking the problem of speed that
dynamic and interpreted languages have been dragging along for years. &lt;a class=&quot;reference&quot; href=&quot;http://www.parrot.org/&quot;&gt;Parrot&lt;/a&gt;
tries to be the über virtual machine. &lt;a class=&quot;reference&quot; href=&quot;http://psyco.sourceforge.net/&quot;&gt;Psyco&lt;/a&gt; offers very nice acceleration, but
currently only on 32bits system. &lt;a class=&quot;reference&quot; href=&quot;http://pypy.org/&quot;&gt;PyPy&lt;/a&gt; might be what he calls the Right
Approach, but still needs a lot of work. Jython and IronPython modify the
language a bit but benefit from the qualities of the &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/JVM&quot;&gt;JVM&lt;/a&gt; or the &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Common_Language_Runtime&quot;&gt;CLR&lt;/a&gt;. &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/unladen-swallow/&quot;&gt;Unladen
Swallow&lt;/a&gt; is probably the one that&#39;s most similar to CrossTwine.&lt;/p&gt;
&lt;p&gt;CrossTwine considers CPython as a library and uses a set of C++ classes to
generate efficient interpreters that make calls to CPython&#39;s
internals. CrossTwine is a tool that helps improving performance by
hand-replacing some code paths with very efficient code that does the same
operations but bypasses the interpreter and its overhead. An interpreter built
with CrossTwine can be viewed as a JIT&#39;ed branch of the official Python
interpreter that should be feature-compatible (and bug-compatible) with CPython.
Damien calls he approach &amp;quot;punching holes in C substrate to get more speed&amp;quot; and
says it could probably be combined with Psyco for even better results.&lt;/p&gt;
&lt;p&gt;CrossTwine works on 64bit systems, but it is not (yet?) free software. It
focuses on some use cases to greatly improve speed and is not to be considered a
general purpose interpreter able to make any Python code faster.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;more-readings&quot;&gt;
&lt;h3&gt;&lt;a&gt;More readings&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://cython.org/&quot;&gt;Cython&lt;/a&gt; is a language that makes writing C extensions for the Python language as
easy as Python itself. It replaces the older &lt;a class=&quot;reference&quot; href=&quot;http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/&quot;&gt;Pyrex&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://conference.scipy.org/proceedings/SciPy2008/&quot;&gt;SciPy2008&lt;/a&gt; conference had at least two papers talking about speeding Python:
&lt;a class=&quot;reference&quot; href=&quot;http://conference.scipy.org/proceedings/SciPy2008/paper_16/&quot;&gt;Converting Python Functions to Dynamically Compiled C&lt;/a&gt; and
&lt;a class=&quot;reference&quot; href=&quot;http://conference.scipy.org/proceedings/SciPy2008/paper_17/&quot;&gt;unPython: Converting Python Numerical Programs into C&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;David Beazley gave a very interesting talk in 2009 at a Chicago Python Users group meeting about the effects of the
&lt;a class=&quot;reference&quot; href=&quot;http://www.dabeaz.com/python/GIL.pdf&quot;&gt;GIL on multicore&lt;/a&gt; machines.&lt;/p&gt;
&lt;p&gt;I will continue my report on the conference with the second part titled
&amp;quot;Applications And Open Questions&amp;quot;.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-07-29T20:43-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9827</guid>
  <title>Logilab at OSCON 2009</title>
  <link>http://www.logilab.org/blogentry/9827</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://assets.en.oreilly.com/1/event/27/oscon2009_oscon_11_years.gif&quot; class=&quot;align-right&quot; src=&quot;http://assets.en.oreilly.com/1/event/27/oscon2009_oscon_11_years.gif&quot; /&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://en.oreilly.com/oscon2009&quot;&gt;OSCON&lt;/a&gt;, Open Source CONvention, takes place every year and promotes Open Source for technology.
It is one of the meeting hubs for the growing open source community. This was the occasion for us
to learn about new projects and to present &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; during a &lt;a class=&quot;reference&quot; href=&quot;http://baypiggies.net/&quot;&gt;BAYPIGgies&lt;/a&gt; meeting hosted by
OSCON.&lt;/p&gt;
&lt;img align=&quot;left&quot; alt=&quot;http://www.openlina.com/templates/rhuk_milkyway/images/header_red_left.png&quot; class=&quot;align-left&quot; src=&quot;http://www.openlina.com/templates/rhuk_milkyway/images/header_red_left.png&quot; /&gt;
&lt;p&gt;I had the chance to talk with some of the folks working at OpenLina where they presented &lt;a class=&quot;reference&quot; href=&quot;http://www.openlina.com/&quot;&gt;LINA&lt;/a&gt;.
&lt;a class=&quot;reference&quot; href=&quot;http://www.openlina.com/&quot;&gt;LINA&lt;/a&gt; is a thin virtual layer that enables developers to write and compile code using ordinary Linux tools, then package that code into a single executable that runs on a variety of operating systems. &lt;a class=&quot;reference&quot; href=&quot;http://www.openlina.com/&quot;&gt;LINA&lt;/a&gt; runs invisibly in the background, enabling the user to install and run LINAfied Linux applications as if they were native to that user&#39;s operating system.
They were curious about CubicWeb and took as a challenge to package it with &lt;a class=&quot;reference&quot; href=&quot;http://www.openlina.com/&quot;&gt;LINA&lt;/a&gt;... maybe soon on &lt;a class=&quot;reference&quot; href=&quot;http://www.openlina.com/index.php/users/applications-for-lina/the-lina-exchange&quot;&gt;LINA&#39;s applications list&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Two open sources projects catched my attention as potential semantic data publishers. The first one is &lt;a class=&quot;reference&quot; href=&quot;http://www.familysearch.org/eng/default.asp&quot;&gt;Family search&lt;/a&gt;  where they provide a tool to search for family history and genealogy. Also they are working to define a standard format to exchange citation with &lt;a class=&quot;reference&quot; href=&quot;http://openlibrary.org/.&quot;&gt;Open Library&lt;/a&gt;.
&lt;a class=&quot;reference&quot; href=&quot;http://www.democracylab.org/&quot;&gt;Democracy Lab&lt;/a&gt; provide an application to collect votes and build geographic statitics based on political interests. They will at some point publish data semantically so that their application data could be consumed.&lt;/p&gt;
&lt;p&gt;It also was for us the occasion of introducing CubicWeb to the BayPIGgies folks. The same &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr/publications/europython2009-cubicweb&quot;&gt;presentation&lt;/a&gt; as the one held at Europython 2009.
I&#39;d like to take the opportunity to answer a question I did not manage to answer at that time. The question was: how different is CubicWeb from Freebase Parallax in terms of interface and views filters? Before answering this question let&#39;s detail what Freebase Parallax is.&lt;/p&gt;
&lt;p&gt;Freebase &lt;a class=&quot;reference&quot; href=&quot;http://mqlx.com/~david/parallax&quot;&gt;Parallax&lt;/a&gt; provides a new way to browse and explore data in Freebase.
It allows to browse data from a set of data to a related set of data. This interface enables to aggregate visualization. For instance, given the set of US presidents, different types of views could be applied, such as a timeline view, where the user could set up which start and end date to use to draw the timeline. So generic views (which applies to any data) are customizable by the user.&lt;/p&gt;
&lt;img align=&quot;left&quot; alt=&quot;http://res.freebase.com/s/f64a2f0cc4534b2b17140fd169cee825a7ed7ddcefe0bf81570301c72a83c0a8/resources/images/freebase-logo.png&quot; class=&quot;align-left&quot; src=&quot;http://res.freebase.com/s/f64a2f0cc4534b2b17140fd169cee825a7ed7ddcefe0bf81570301c72a83c0a8/resources/images/freebase-logo.png&quot; /&gt;
&lt;p&gt;The search powered by Parallax is very similar to CubicWeb faceted search, except that Parallax provides the user with a list of suggested filters to add in addition to the default one, the user can even remove a filter. That is something we could think about for CubicWeb: provide a generated faceted search so that the user could decide which filters to choose.&lt;/p&gt;
&lt;p&gt;Parallax also provides related topics to the current data set which ease navigation between sets of data.
The main difference I could see with the view filter offered by Parallax and CubicWeb is that Parallax provides the same views to any type of data whereas CubicWeb has specific views depending on the data type and generic views that applies to any type of data.
This is a nice Web interface to browse data and it could be a good source of inspiration for CubicWeb.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.zgeek.com/forum/gallery/files/6/3/2/img_228_96x96.jpg&quot; class=&quot;align-center&quot; src=&quot;http://www.zgeek.com/forum/gallery/files/6/3/2/img_228_96x96.jpg&quot; /&gt;&lt;/div&gt;
&lt;p&gt;During this talk, I mentionned that CubicWeb now understands &lt;a class=&quot;reference&quot; href=&quot;http://www.w3.org/TR/rdf-sparql-query/&quot;&gt;SPARQL&lt;/a&gt; queries thanks to the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/fyzz/&quot;&gt;fyzz&lt;/a&gt; parser.&lt;/p&gt;
</description>
  <dc:date>2009-07-28T00:52-01:00</dc:date>
  <dc:creator>Sandrine Ribeau</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9608</guid>
  <title>Quizz WolframAlpha</title>
  <link>http://www.logilab.org/blogentry/9608</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9609?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9609?vid=download&quot; /&gt;
&lt;p&gt;Wolfram Alpha is a web front-end to huge database of information covering very different topics ranging from mathematical functions to genetics, geography, astronomy, etc.&lt;/p&gt;
&lt;p&gt;When you search for a word, it will try to match it with one of the objects it as in its database and display all the information it has concerning that object. For example it can tell you a lot about the &lt;a class=&quot;reference&quot; href=&quot;http://www94.wolframalpha.com/input/?i=halley+comet&quot;&gt;Halley Comet&lt;/a&gt;, including where it is at the moment you ask the query. This is the main difference with, say Wikipedia, that will know a lot about that &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Halley_comet&quot;&gt;comet&lt;/a&gt; in general, but is not meant to compute its location in the sky at the moment you enter your query.&lt;/p&gt;
&lt;p&gt;Searches are not limited to words. One can key in commands like &lt;a class=&quot;reference&quot; href=&quot;http://www34.wolframalpha.com/input/?i=weather+in+paris+in+june+2009&quot;&gt;weather in Paris in june 2009&lt;/a&gt; or &lt;a class=&quot;reference&quot; href=&quot;http://www34.wolframalpha.com/input/?i=x^2+sin(x)&quot;&gt;x^2+sin(x)&lt;/a&gt; and get results for those precise queries. The processing of the input query is far from bad, since it returns results to questions like &lt;a class=&quot;reference&quot; href=&quot;http://www34.wolframalpha.com/input/?i=what+are+the+cities+of+france+&quot;&gt;what are the cities of France&lt;/a&gt;, but I would not call it state of the art natural language processing since that query returns the largest cities instead of just the cities it knows about and the question &lt;a class=&quot;reference&quot; href=&quot;http://www34.wolframalpha.com/input/?i=what+are+the+smallest+cities+of+france+&quot;&gt;what are the smallest cities of France&lt;/a&gt; will not return any result. Natural language processing is a very difficult problem, though, especially when done in the open world as it is the case there with a engine available to the wide public on the internet.&lt;/p&gt;
&lt;p&gt;For &lt;a class=&quot;reference&quot; href=&quot;http://www34.wolframalpha.com/examples/&quot;&gt;more examples&lt;/a&gt;, visit the WolframAlpha website, where you will also be able to &lt;a class=&quot;reference&quot; href=&quot;http://community.wolframalpha.com/&quot;&gt;post feature requests&lt;/a&gt; or, if you are a developer, get documentation about the &lt;a class=&quot;reference&quot; href=&quot;http://www.wolframalpha.com/developers.html&quot;&gt;WolframAlpha API&lt;/a&gt; and maybe use it as a web service in your application when you need to answer certain types of questions.&lt;/p&gt;
</description>
  <dc:date>2009-07-10T16:00-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9579</guid>
  <title>EuroPython 2009</title>
  <link>http://www.logilab.org/blogentry/9579</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9580?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9580?vid=download&quot; /&gt;
&lt;p&gt;Once again Logilab sponsored the &lt;a class=&quot;reference&quot; href=&quot;http://www.europython.eu/&quot;&gt;EuroPython&lt;/a&gt; conference. We would like to thank
the organization team (especially John Pinner and Laura Creighton) for their
hard work. The Conservatoire is a very central location in Birmingham and
walking around the city center and along the canals was nice. The website was
helpful when preparing the trip and made it easy to find places where to eat and
stay. The conference program was full of talks about interesting topics.&lt;/p&gt;
&lt;p&gt;I presented &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; and spent a large part of my talk explaining what is the
semantic web and what features we need in the tools we will use to be part of
that web of data. I insisted on the fact that CubicWeb is made of &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/doc/en/intro/concepts/&quot;&gt;two parts&lt;/a&gt;,
the web engine and the data repository, and that the repository can be used
without the web engine. I demonstrated this with a TurboGears application that
used the CubicWeb repository as its persistence layer. RQL in TurboGears! See &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr/publications/europython2009-cubicweb&quot;&gt;my
slides&lt;/a&gt; and Reinout Van Rees&#39; &lt;a class=&quot;reference&quot; href=&quot;http://reinout.vanrees.org/weblog/2009/07/01/ep-cubicweb.html&quot;&gt;write-up&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Christian Tismer took over the development of &lt;a class=&quot;reference&quot; href=&quot;http://psyco.sourceforge.net/&quot;&gt;Psyco&lt;/a&gt; a few months ago. He said he
recently removed some bugs that were show stoppers, including one that was
generating way too many recompilations. His new version looks very
promising. Performance improved, long numbers are supported, 64bit support may
become possible, generators work... and Stackless is about to be rebuilt on top of
Psyco! Psyco 2.0 should be out today.&lt;/p&gt;
&lt;p&gt;I had a nice chat with Cosmin Basca about the Semantic Web. He suggested using
Mako as a templating language for CubicWeb. Cosmin is doing his PhD at DERI and
develops &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/surfrdf/wiki/dbpediaLiveExample&quot;&gt;SurfRDF&lt;/a&gt; which is an Object-RDF mapper that wraps a SPARQL endpoint to
provide &amp;quot;discoverable&amp;quot; objects. See his &lt;a class=&quot;reference&quot; href=&quot;http://wiki.europython.eu/TalkMaterials?action=AttachFile&amp;amp;do=get&amp;amp;target=SuRF+%E2%80%93+Tapping+into+the+Web+of+Data+EUROPYTHON09.pdf&quot;&gt;slides&lt;/a&gt; and Reinout Van Rees&#39; &lt;a class=&quot;reference&quot; href=&quot;http://reinout.vanrees.org/weblog/2009/07/01/ep-web-of-data.html&quot;&gt;summary&lt;/a&gt;
of his talk.&lt;/p&gt;
&lt;p&gt;I saw a lightning talk about the &lt;a class=&quot;reference&quot; href=&quot;http://www.nagare.org/&quot;&gt;Nagare&lt;/a&gt; framework which refuses to use
templating languages, for the same reason we do not use them in CubicWeb. Is
their &lt;tt class=&quot;docutils literal&quot;&gt;h.something&lt;/tt&gt; the right way of doing things? The &lt;a class=&quot;reference&quot; href=&quot;http://www.nagare.org/trac/blog/html-structuration-inheritance-aggregation&quot;&gt;example&lt;/a&gt; reminds me of the
C++ concatenation operator. I am not really convinced with the continuation idea
since I have been for years a happy user of the reactor model that&#39;s implemented
in frameworks liked Twisted. Read the &lt;a class=&quot;reference&quot; href=&quot;http://www.nagare.org/trac/blog&quot;&gt;blog&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.nagare.org/trac/wiki&quot;&gt;documentation&lt;/a&gt; for more
information.&lt;/p&gt;
&lt;p&gt;I had a chat with Jasper Op de Coul about Infrae&#39;s &lt;a class=&quot;reference&quot; href=&quot;http://wiki.europython.eu/TalkMaterials?action=AttachFile&amp;amp;do=get&amp;amp;target=MOAI+Server&quot;&gt;OAI Server&lt;/a&gt; and the work he
did to manage RDF data in Subversion and a relational database before publishing
it within a web app based on &lt;a class=&quot;reference&quot; href=&quot;http://developer.yahoo.com/yui/&quot;&gt;YUI&lt;/a&gt;. We commented code that handles books and
library catalogs. Part of my CubicWeb demo was about books in DBpedia and
&lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb-book&quot;&gt;cubicweb-book&lt;/a&gt;. He gave me a nice link to the &lt;a class=&quot;reference&quot; href=&quot;http://xisbn.worldcat.org/xisbnadmin/doc/api.htm&quot;&gt;WorldCat API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Souheil Chelfouh showed me his work on &lt;a class=&quot;reference&quot; href=&quot;http://tracker.trollfot.org/wiki/Dolmen&quot;&gt;Dolmen&lt;/a&gt; and Menhir. For several design
problems and framework architecture issues, we compared the solutions offered by
the &lt;a class=&quot;reference&quot; href=&quot;http://docs.zope.org/zopetoolkit/&quot;&gt;Zope Toolkit&lt;/a&gt; library with the ones found by CubicWeb. I will have to read
more about &lt;a class=&quot;reference&quot; href=&quot;http://pypi.python.org/pypi/martian&quot;&gt;Martian&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://grok.zope.org/&quot;&gt;Grok&lt;/a&gt; to make sure I understand the details of that
component architecture.&lt;/p&gt;
&lt;p&gt;I had a chat with Martijn Faassen about packaging Python modules. A one sentence
summary would be that the Python community should agree on a meta-data format
that describes packages and their dependencies, then let everyone use the tool
he likes most to manage the installation and removal of software on his system.
I hope the work done during the last PyConUS and led by Tarek Ziadé arrived at the
same conclusion. Read David Cournapeau&#39;s blog entry about &lt;a class=&quot;reference&quot; href=&quot;http://cournape.wordpress.com/2009/04/01/python-packaging-a-few-observations-cabal-for-a-solution/&quot;&gt;Python Packaging&lt;/a&gt; for
a detailed explanation of why the meta-data format is the way to go. By the way,
Martijn is the lead developer of Grok and Martian.&lt;/p&gt;
&lt;p&gt;Godefroid Chapelle and I talked a lot about Zope Toolkit (ZTK) and CubicWeb. We
compared the way the two frameworks deal with pluggable components. ZTK has
adapters and a registry. CubicWeb does not use adapters as ZTK does, but has a
&lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/doc/en/intro/tutorial/create-cube#defineviews&quot;&gt;view selection mechanism&lt;/a&gt; that required a registry with more features than the
one used in ZTK. The ZTK registry only has to match a tuple (Interface, Class)
when looking for an adapter, whereas CubicWeb&#39;s registry has to find the views
that can be applied to a result set by checking various properties:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;interfaces: all items of first column implement the Calendar Interface,&lt;/li&gt;
&lt;li&gt;dimensions: more than one line, more than two columns,&lt;/li&gt;
&lt;li&gt;types: items of first column are numbers or dates,&lt;/li&gt;
&lt;li&gt;form: form contains key XYZ that has a value lower than 10,&lt;/li&gt;
&lt;li&gt;session: user is authenticated,&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As for Grok and Martian, I will have to look into the details to make sure
nothing evil is hinding there. I should also find time to compare &lt;a class=&quot;reference&quot; href=&quot;http://pypi.python.org/pypi/zope.schema&quot;&gt;zope.schema&lt;/a&gt;
and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/yams&quot;&gt;yams&lt;/a&gt; and write about it on this blog.&lt;/p&gt;
&lt;p&gt;And if you want more information about the conference:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;photos tagged europython in &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/groups/europython/&quot;&gt;flickr&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.europython.eu/gallery/europython-2009/&quot;&gt;gallery&lt;/a&gt; on the website&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://wiki.europython.eu/After&quot;&gt;blogs&lt;/a&gt; reporting on europython&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://wiki.europython.eu/RecordedTalks&quot;&gt;recorded&lt;/a&gt; talks and &lt;a class=&quot;reference&quot; href=&quot;http://wiki.europython.eu/TalkMaterials&quot;&gt;presentation&lt;/a&gt; materials&lt;/li&gt;
&lt;/ul&gt;
</description>
  <dc:date>2009-07-06T17:35-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9374</guid>
  <title>Semantic web technology conference 2009</title>
  <link>http://www.logilab.org/blogentry/9374</link>
  <description>&lt;div&gt;&lt;img align=&quot;left&quot; src=&quot;http://image.bio-medicine.org/img/Fifth-Annual-SemTech-Conference-Highlights-How-Semantics-Power-Chemistry--Pharmaceutical--Healthcare--and-Other-Life-Science-Solutions.gif&quot;/&gt;&lt;a href=&quot;http://semtech2009.com/&quot;&gt;The semantic web technology conference&lt;/a&gt; is taking place every year in San Jose, California. It is meant to be the world&#39;s symposium on the business of semantic technologies. Essentially here we discuss about semantic search, how to improve access to the data and how we make sense of structured, but mainly unstructured content.&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
Some exhibitors were more NLP oriented, concepts extraction (such as &lt;a href=&quot;http://www.semanticv.com/&quot;&gt;SemanticV&lt;/a&gt;), others were more focused on providing a scalable storage (essentially RDF storage). Most of the solutions includes a data aggregator/unifier in order to combine multi-sources data into a single storage from which ontologies could be defined. &amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
Then on top of that is the enhanced search engine. They concentrate on internal data within the enterprise and not that much about using the Web as a resource. For those who built a web application on top of the data, they choosed &lt;a href=&quot;http://www.adobe.com/products/flex/&quot;&gt;Flex&lt;/a&gt; as their framework (&lt;a href=&quot;http://www.metatomix.com/&quot;&gt;Metatomix&lt;/a&gt;).&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;From all the exhibitors, the ones that kept my attention were &lt;a href=&quot;http://www.cambridgesemantics.com/products/anzo_on_the_web&quot;&gt;The Anzo suite&lt;/a&gt; (&lt;a href=&quot;http://www.openanzo.org/&quot;&gt;open source project&lt;/a&gt;), &lt;a href=&quot;http://ordi.sourceforge.net/&quot;&gt;ORDI&lt;/a&gt; and &lt;a href=&quot;http://www.franz.com/agraph/allegrograph/&quot;&gt;Allegrograph RDF store&lt;/a&gt;.&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;Developped by Cambridge Semantics, in Java, Anzo suite, especially, Anzo on the web and Anzo collaboration server, is the closest tools to CubicWeb, providing a multi source data server and an AJAX/HTML interface to develop semantic web applications, customize views of the data using a templating language. It is available in open source.&amp;#13;&amp;#13;&amp;#13;
The feature that I think was interesting is an assistant to load data into their application that then helps the users define the data model based on that data. The internal representation of the content is totally transparent to the user, types are inferred by the application, as well as relations.&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;&lt;img src=&quot;http://www.w3.org/RDF/icons/rdf_w3c_icon.96.gif&quot; alt=&quot;RDF Resource Description Framework Icon&quot; align=&quot;right&quot;/&gt;I did not get a demo of ORDI, but it was just mentionned to me as an open source equivalent to CubicWeb, which I am not too sure about after looking at their web site. It does data integration into RDF.&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;Allegrograph RDF store is a potential candidate for another source type in CubicWeb . It is already supported by Jena and Sesame framework. &amp;#13;&amp;#13;&amp;#13;&amp;#13;
They developped a Python client API to attract pythonist in the Java world. &lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;They all agreed on one thing : the use of SPARQL should be the standard query language. I quickly heard about Knowledge Interface Format (KIF) which seems to be an interesting representation of knowledge used for multi-lingual applications. If there was one buzz word to recall from the conference, I would choose ontology :)&lt;/div&gt;</description>
  <dc:date>2009-06-17T23:48-01:00</dc:date>
  <dc:creator>Sandrine Ribeau</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9371</guid>
  <title>IPMI plugin for Munin python code published</title>
  <link>http://www.logilab.org/blogentry/9371</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9368?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9368?vid=download&quot; /&gt;
&lt;p&gt;As you might have noticed we quite like &lt;a class=&quot;reference&quot; href=&quot;http://munin.projects.linpro.no/&quot;&gt;munin&lt;/a&gt;. We use it quite a bit to monitor how our servers and services are doing. One of the things we like about munin is obviously that the plugins can be written in &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org&quot;&gt;python&lt;/a&gt; (and perl, bash  and ruby).&lt;/p&gt;
&lt;p&gt;On a few recent servers we started playing with &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface&quot;&gt;IPMI&lt;/a&gt; to sensor the temperature, watts, fan&#39;s rpms etc. So we went out looking for a munin plugin for that. We found Peter Palfrader&#39;s ruby plugins. There was one small glitch though, we came across a simple bug : the &amp;quot;ipmitool -I open sensor&amp;quot; can be real long to execute on certain machines, so configuring the plugin was a bit painful and running it too. Changing the ruby code was a bit tricky since we don&#39;t really know ruby... so we did a quick rewrite of the plugin in python... with a few optimizations.&lt;/p&gt;
&lt;p&gt;It&#39;s not really complete but works for us, and might be useful to you, so we&#39;re publishing the hg repo. You can get the &lt;a class=&quot;reference&quot; href=&quot;http://hg.logilab.org/munin_ipmi_plugins/archive/f2e7c91f5ea7.tar.gz&quot;&gt;tgz&lt;/a&gt; or browse the &lt;a class=&quot;reference&quot; href=&quot;http://hg.logilab.org/munin_ipmi_plugins/file/f2e7c91f5ea7&quot;&gt;source&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2009-06-17T16:52-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9322</guid>
  <title>Google I/O 2009</title>
  <link>http://www.logilab.org/blogentry/9322</link>
  <description>&lt;img align=&quot;right&quot; src=&quot;http://code.google.com/intl/fr/apis/wave/images/wavelogo.png&quot;/&gt;&lt;div&gt;The big event of the conference was the annoucement of &lt;a href=&quot;http://wave.google.com/&quot;&gt;Google Wave&lt;/a&gt;, a new online communication and collaboration tool, built on the Google Web Toolkit (GWT).&amp;#13;&amp;#13;&amp;#13;&amp;#13;
Another big thing the GWT, lots of application built with it, a delightful tool for Java developers.&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;It was interesting to see that Google App Engine (GAE) will shortly provide an API to do offline processing, with objects called Task Queue. &amp;#13;&amp;#13;&amp;#13;&amp;#13;
Task queue are web hooks, tasks are pushed to the server, queued and they are pushed until the task is executed (which overpass the annoying well-known time out issue with Google App Engine). &amp;#13;&amp;#13;&amp;#13;&amp;#13;
It was introduced as asynchronous, enabling low latency, reliable and scalable (where are the buzz words?).&amp;#13;&amp;#13;&amp;#13;&amp;#13;
Of course, this news has been a huge relief for most of the developers in the public as that was a big missing part from GAE.&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;An nice presentation from the founders of FrontSeat.org about their current project &lt;a href=&quot;http://www.walkscore.com&quot;&gt;Walk score&lt;/a&gt;. They introduced themselves as civic software developers, writing software in a civic manner.&amp;#13;&amp;#13;
They explained how they use GAE, and why they had to use Amazon EC2 to compensate GAE gaps. The gaps they listed here were the ranking non-ability of GAE, the too long reponse time for such computation they do, the fact that no cron jobs can be done (the arrival of Task Queue might change their opinion).&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&lt;img src=&quot;http://code.google.com/intl/fr/events/io/images/io2009.png&quot; align=&quot;left&quot;/&gt;&lt;div&gt;All the sessions have been recorded and are available &lt;a href=&quot;http://code.google.com/events/io/sessions.html&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&amp;#13;&amp;#13;&amp;#13;&amp;#13;
&lt;div&gt;And yes, as all the participants of this conference, I went back home with an Android phone :)&lt;/div&gt;</description>
  <dc:date>2009-06-10T07:17-01:00</dc:date>
  <dc:creator>Sandrine Ribeau</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9297</guid>
  <title>hgview 1.0.0 released!</title>
  <link>http://www.logilab.org/blogentry/9297</link>
  <description>&lt;p&gt;I am pleased to introduce you to the latest kid of the Logilab team: &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/1.1.0&quot;&gt;hgview 1.0.0&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview&quot;&gt;hgview&lt;/a&gt; is a very helpful tool for daily work using the excellent DVCS &lt;a class=&quot;reference&quot; href=&quot;http://www.selenic.com/mercurial&quot;&gt;Mercurial&lt;/a&gt; (which we heavily use at Logilab). It allows to easily and visually navigate your hg repository revision graphlog. It is written in &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org&quot;&gt;Python&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.riverbankcomputing.co.uk/software/pyqt/intro&quot;&gt;pyqt&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This version is an almost complete rewrite of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/0.11.2&quot;&gt;hgview 0.x&lt;/a&gt; which had two GUI backends, &lt;a class=&quot;reference&quot; href=&quot;http://www.gtk.org&quot;&gt;gtk&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.qtsoftware.com/products/&quot;&gt;qt4&lt;/a&gt;. This 1.0 release drops the gtk backend (we may consider reintroducing it, we haven&#39;t decided yet... by the way, patches are always welcome). Some may not like this choice, but the immediate benefit of using &lt;a class=&quot;reference&quot; href=&quot;http://www.qtsoftware.com/products/&quot;&gt;qt4&lt;/a&gt; is that hgview works like a charm on MacOS X systems.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9269?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9269?vid=download&quot; style=&quot;width: 450px;&quot; /&gt;
&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: there was a bug in hgview 1.0.0 on Ubuntu hardy. It&#39;s now fixed, and I&#39;ve uploaded a 1.0.1 version deb package for hardy.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;features&quot;&gt;
&lt;h3&gt;&lt;a&gt;Features&lt;/a&gt;&lt;/h3&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;4 different viewers:&lt;ul&gt;
&lt;li&gt;repository navigator that displays the graphlog efficiently (works well with 10,000 changesets),&lt;/li&gt;
&lt;li&gt;filelog navigator that displays the filelog of a file (follows files through renames),&lt;/li&gt;
&lt;li&gt;filelog diff navigator that displays the filelog in diff mode to easily track changes between two revisions of a file,&lt;/li&gt;
&lt;li&gt;manifest viewer that navigates in the files hierarchy as it was at a given revision.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Each viewer offers:&lt;ul&gt;
&lt;li&gt;easy keyboard navigation:&lt;ul&gt;
&lt;li&gt;up/down to change revision,&lt;/li&gt;
&lt;li&gt;left/right to change file (for the repo navigator only),&lt;/li&gt;
&lt;li&gt;return to display the diff viewer of the selected file,&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;search quickbar (Ctrl+F or /): search in graphlog (search as you type in the currently displayed file or diff, plus a cancellable background search in the revision tree),&lt;/li&gt;
&lt;li&gt;goto quickbar (Ctrl+G): go to the given revision (accepts id or tag, with completion for tags),&lt;/li&gt;
&lt;li&gt;navigation history: alt+left/alt+right to navigate backward/forward in the history,&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;can be used alone or as a hg extension,&lt;/li&gt;
&lt;li&gt;can be configured using standard hg rc files (system, user or per repository),&lt;/li&gt;
&lt;li&gt;possibility to declare users (with multiple mail addresses) and assign them a given color to make a given user look the same in all your repositories,&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;download-and-installation&quot;&gt;
&lt;h3&gt;&lt;a&gt;Download and installation&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The source code is available as a &lt;a class=&quot;reference&quot; href=&quot;http://ftp.logilab.org/pub/hgview/hgview-1.0.0.tar.gz&quot;&gt;tarball&lt;/a&gt;, or using our &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/cgi-bin/hgwebdir.cgi/&quot;&gt;public hg repository&lt;/a&gt; of course.&lt;/p&gt;
&lt;p&gt;To use it from the sources, you just have to add a line in your &lt;tt class=&quot;docutils literal&quot;&gt;.hgrc&lt;/tt&gt; file, in the &lt;cite&gt;[extensions]&lt;/cite&gt; section:&lt;/p&gt;
&lt;blockquote&gt;
hgext.hgview=/path/to/hgview/hgext/hgview.py&lt;/blockquote&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org&quot;&gt;Debian&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt; users can also easily install hgview (and Logilab other free software tools) using our &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/card/LogilabDebianRepository&quot;&gt;deb package repositories&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-06-05T21:55-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9294</guid>
  <title>The Web is reaching version 3</title>
  <link>http://www.logilab.org/blogentry/9294</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9295?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9295?vid=download&quot; /&gt;
&lt;p&gt;I presented CubicWeb at several conferences recently and I used the following as an introduction.&lt;/p&gt;
&lt;p&gt;Web version numbers:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;version 0 = the internet links computers&lt;/li&gt;
&lt;li&gt;version 1 = the web links documents&lt;/li&gt;
&lt;li&gt;version 2 = web applications&lt;/li&gt;
&lt;li&gt;version 3 = the semantic web links data [we are here!]&lt;/li&gt;
&lt;li&gt;version 4 = more personnalization and fix problems with privacy and security&lt;/li&gt;
&lt;li&gt;... reach into physical world, bits of AI, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In his blog at MIT, Tim Berners-Lee calls version 0 the &lt;em&gt;International Information Infrastructure&lt;/em&gt;, version 1 the &lt;em&gt;World Wide Web&lt;/em&gt; and version 3 the &lt;em&gt;Giant Global Graph&lt;/em&gt;. Read the details about the &lt;a class=&quot;reference&quot; href=&quot;http://dig.csail.mit.edu/breadcrumbs/node/215&quot;&gt;Giant Global Graph&lt;/a&gt; on his blog.&lt;/p&gt;
</description>
  <dc:date>2009-06-05T20:18-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9209</guid>
  <title>Nous allons à PyConFr 2009</title>
  <link>http://www.logilab.org/blogentry/9209</link>
  <description>&lt;p&gt;Le 30 et 31 mai prochain (samedi et dimanche prochain) nous allons être présents à &lt;a class=&quot;reference&quot; href=&quot;http://www.pycon.fr/&quot;&gt;PyConFr&lt;/a&gt; édition 2009, nous sommes &lt;a class=&quot;reference&quot; href=&quot;http://www.pycon.fr/partenaires.html&quot;&gt;partenaire&lt;/a&gt; de l&#39;évènement et allons y parler de &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt;. Pour être plus précis, Nicolas Chauvat y présentera &lt;a class=&quot;reference&quot; href=&quot;http://pycon.fr/sessions/seances/cubicweb_pour_publier_dbpedia_et_openlibrary&quot;&gt;&amp;quot;CubicWeb pour publier DBpedia et OpenLibrary&amp;quot;&lt;/a&gt;. Il avait déjà évoqué ces sujets sur ce site : &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/9138&quot;&gt;Fetching book descriptions and covers&lt;/a&gt; et  &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/6679&quot;&gt;DBpedia 3.2 released&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Si vous comptez y aller, n&#39;hésitez pas à venir nous dire bonjour.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://pycon.fr/images/logo_pyconfr_small.png&quot; class=&quot;align-center&quot; src=&quot;http://pycon.fr/images/logo_pyconfr_small.png&quot; /&gt;&lt;/div&gt;
</description>
  <dc:date>2009-05-25T15:05-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9152</guid>
  <title>Almost reached 1000 tickets</title>
  <link>http://www.logilab.org/blogentry/9152</link>
  <description>&lt;p&gt;Logilab.org has almost reached a thousand tickets on the Logilab&#39;s open source projects. To be exact there are 940 tickets right now. What kind of tickets are they ?&lt;/p&gt;
&lt;p&gt;Here is a quick graph of the state of the tickets in our tracker :&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://chart.apis.google.com/chart?cht=p&amp;amp;chs=400x200&amp;amp;chd=e:Dc..Iw9EXV&amp;amp;chtt=Logilab.org+tickets+by+state&amp;amp;chl=deprecated%20:%2020|open%20:%20373|rejected%20:%2051|resolved%20:%20358|validated%20:%20136&quot; class=&quot;align-center&quot; src=&quot;http://chart.apis.google.com/chart?cht=p&amp;amp;chs=400x200&amp;amp;chd=e:Dc..Iw9EXV&amp;amp;chtt=Logilab.org+tickets+by+state&amp;amp;chl=deprecated%20:%2020|open%20:%20373|rejected%20:%2051|resolved%20:%20358|validated%20:%20136&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Graphing is neat. Maybe soon we&#39;ll get this kind of feature automatically in the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb-forge&quot;&gt;forge&lt;/a&gt;, see &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/ticket/343038&quot;&gt;this ticket&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2009-05-13T10:30-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9145</guid>
  <title>Reading SPE files</title>
  <link>http://www.logilab.org/blogentry/9145</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/CCD.jpg/300px-CCD.jpg&quot; class=&quot;align-right&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/CCD.jpg/300px-CCD.jpg&quot; style=&quot;height: 100px;&quot; /&gt;
&lt;p&gt;If you would like to read SPE files from &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/CCD_camera&quot;&gt;charge-coupled device (CCD) cameras&lt;/a&gt;, I have contributed a recipe to the SciPy cookbook, see &lt;a class=&quot;reference&quot; href=&quot;http://scipy.org/Cookbook/Reading_SPE_files&quot;&gt;Reading SPE files&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2009-05-11T15:37-01:00</dc:date>
  <dc:creator>Andre Espaze</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9138</guid>
  <title>Fetching book descriptions and covers</title>
  <link>http://www.logilab.org/blogentry/9138</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.logilab.org/image/9139?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/image/9139?vid=download&quot; /&gt;
&lt;p&gt;We recently added the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb-book&quot;&gt;book cube&lt;/a&gt; to our intranet in order for books available in our library to show up in the search results. Entering a couple books using the default HTML form, even with the help of copy/paste from &lt;a class=&quot;reference&quot; href=&quot;http://books.google.com/&quot;&gt;Google Book&lt;/a&gt; or &lt;a class=&quot;reference&quot; href=&quot;http://www.amazon.com&quot;&gt;Amazon&lt;/a&gt;, is boring enough to make one seek out other options.&lt;/p&gt;
&lt;p&gt;As a Python and Debian user, I put the &lt;a class=&quot;reference&quot; href=&quot;http://packages.debian.org/source/sid/python-gdata&quot;&gt;python-gdata&lt;/a&gt; package on my list of options, but quickly realized that the version in Debian is not current and that the books service is not yet accessible with the python gdata client. Both problems could be easily overcome since I could update Debian&#39;s version from 1.1.1 to the latest 1.3.1 and patch it with the &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/gdata-python-client/issues/detail?id=238&quot;&gt;book search support&lt;/a&gt; that will be included in the next release, but I went on exploring other options.&lt;/p&gt;
&lt;p&gt;Amazon is the first answer that comes to mind when speaking of books on the net and &lt;a class=&quot;reference&quot; href=&quot;http://pyaws.sourceforge.net/&quot;&gt;pyAWS&lt;/a&gt; looks like a nice wrapper around the Amazon Web Service. The quickstart example on the home page does almost exactly what I was looking for. Trying to find a Debian package of pyAWS, I only came accross &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/boto/&quot;&gt;boto&lt;/a&gt; which appears to be general purpose.&lt;/p&gt;
&lt;p&gt;Registering with Amazon and Google to get a key and use their web services is doable, but one wonders why something as common as books and public libraries would have to be accessed through private companies. It turns out Wikipedia knows of &lt;em&gt;many&lt;/em&gt; book &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Special:BookSources/&quot;&gt;catalogs&lt;/a&gt; on the net, but I was looking for a site publishing data as RDF or part of the &lt;a class=&quot;reference&quot; href=&quot;http://linkeddata.org&quot;&gt;Linked Open Data&lt;/a&gt; initiative. I ended up with almost exactly what I needed.&lt;/p&gt;
&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://openlibrary.org/&quot;&gt;Open Library&lt;/a&gt; features millions of books and covers, publicly accessible as JSON using its &lt;a class=&quot;reference&quot; href=&quot;http://openlibrary.org/dev/docs&quot;&gt;API&lt;/a&gt;. There is even a dump of the database. End of search, be happy.&lt;/p&gt;
&lt;p&gt;Next step is to use this service to enhance the cubicweb-book cube by allowing a user to add a new book to its collection by simply entering a &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Isbn&quot;&gt;ISBN&lt;/a&gt;. All data about the book can be fetched from the OpenLibrary, including the cover and information about the author. You can expect such a new version soon... and we will probably get a new demo of &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; online in the process, since all that data available as a &lt;a class=&quot;reference&quot; href=&quot;http://openlibrary.org/dev/docs/jsondump&quot;&gt;dump&lt;/a&gt; is screaming for reuse as others have already found out by making it &lt;a class=&quot;reference&quot; href=&quot;http://mondeca.wordpress.com/2009/01/05/openlibrary-api-rdf-wrapper-on-google-app-engine/&quot;&gt;available as RDF&lt;/a&gt; on AppEngine!&lt;/p&gt;
</description>
  <dc:date>2009-05-11T06:34-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/9097</guid>
  <title>iclassmethod decorator to define both a class and an instance method in one go</title>
  <link>http://www.logilab.org/blogentry/9097</link>
  <description>&lt;p&gt;You&#39;ll find in the &lt;cite&gt;logilab.common.decorators&lt;/cite&gt; module the &lt;cite&gt;iclassmethod&lt;/cite&gt; decorator which may be pretty handy in some cases as it allows methods to be both called as class methods or as instance methods. In the first case the first argument will be the class and the second case it will be the instance.&lt;/p&gt;
&lt;p&gt;Example extracted (and adapted for simplicity) from &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logilab.common.decorators&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iclassmethod&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Form&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;_fields_&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
      &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fields&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_fields_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;nd&quot;&gt;@iclassmethod&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;field_by_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cls_or_self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
      &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;return field with the given name and role&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cls_or_self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;fields&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cls_or_self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_fields_&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;fields&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cls_or_self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fields&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fields&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
              &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;Exception&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;FieldNotFound: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Example session:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logilab.common&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;attrdict&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Form&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fields&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;attrdict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;something&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;value&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;field_by_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;something&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;something&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;value&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Form&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;field_by_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;something&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Traceback&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;most&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;recent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;call&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;File&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;File&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;field_by_name&lt;/span&gt;
&lt;span class=&quot;ne&quot;&gt;Exception&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FieldNotFound&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;something&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So we get a field_by_name method which will act differently (actually use different input data) when called as instance method or as class method.&lt;/p&gt;
&lt;p&gt;Also notice the &lt;cite&gt;attrdict&lt;/cite&gt; trick that can also be achieved with the Python 2.6 named tuple.&lt;/p&gt;
</description>
  <dc:date>2009-04-28T09:27-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8862</guid>
  <title>12 ans de l&#39;April: bilan et objectifs</title>
  <link>http://www.logilab.org/blogentry/8862</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.april.org/themes/zen/zen_april/images/logo.png&quot; class=&quot;align-right&quot; src=&quot;http://www.april.org/themes/zen/zen_april/images/logo.png&quot; /&gt;
&lt;p&gt;L&#39;April fête cette année ses douze ans. L&#39;association de promotion et de défense du logiciel libre approche maintenant les 5000 membres, toutes catégories confondues: personnes physiques, entreprises commerciales, collectivités, associations. Elle vient de publier son &lt;a class=&quot;reference&quot; href=&quot;http://www.april.org/fr/lapril-publie-son-rapport-moral-2008&quot;&gt;rapport moral 2008&lt;/a&gt;  et sa &lt;a class=&quot;reference&quot; href=&quot;http://www.april.org/fr/feuille-de-route-2009-2014&quot;&gt;feuille de route 2014&lt;/a&gt; qui fixe des objectis pour les cinq années à venir. On notera en particulier la lutte contre les quatre dangers que sont les brevets sur les algorithmes, les dispositifs de contrôle d&#39;usage, la vente liée et l&#39;informatique déloyale. Consultez le site de l&#39;&lt;a class=&quot;reference&quot; href=&quot;http://www.april.org/&quot;&gt;April&lt;/a&gt; pour en savoir plus sur ses actions et n&#39;hésitez pas à &lt;a class=&quot;reference&quot; href=&quot;http://www.april.org/adherer&quot;&gt;adhérer&lt;/a&gt; ou à &lt;a class=&quot;reference&quot; href=&quot;http://www.april.org/fr/benevolat-valorise&quot;&gt;donner quelques heures&lt;/a&gt; de votre temps.&lt;/p&gt;
</description>
  <dc:date>2009-04-05T18:45-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8860</guid>
  <title>Emacs and mercurial trick</title>
  <link>http://www.logilab.org/blogentry/8860</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://www.logilab.org/image/8863?vid=download&quot; class=&quot;align-left&quot; src=&quot;http://www.logilab.org/image/8863?vid=download&quot; /&gt;
&lt;p&gt;While using emacs I always find the need to use grep on a terminal to search for things within
a specific project. This is not ideal, even within an embedded emacs shell.&lt;/p&gt;
&lt;p&gt;Since I recently discovered the emacs command &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;grep-find&lt;/span&gt;&lt;/tt&gt;  I decided to make it work nicely
with mercurial projects, and here&#39;s the result:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;grep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;project&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;interactive&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;sSearch project for: &amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;grep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;concat&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;files=(`hg manifest`);grep -nH -e &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; ${files[@]/#/`hg root`/}&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;global&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;quote&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f4&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;quote&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;grep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;project&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
</description>
  <dc:date>2009-04-03T15:01-01:00</dc:date>
  <dc:creator>Ludovic Aubry</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8815</guid>
  <title>Venez nous rendre visite à Solution Linux 2009</title>
  <link>http://www.logilab.org/blogentry/8815</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://www.solutionslinux.fr/images/index_07.jpg&quot; class=&quot;align-left&quot; src=&quot;http://www.solutionslinux.fr/images/index_07.jpg&quot; /&gt;
&lt;p&gt;Nous sommes dès ce matin, pendant 3 jours, présents au salon &lt;a class=&quot;reference&quot; href=&quot;http://www.solutionslinux.fr/&quot;&gt;Solutions Linux 2009&lt;/a&gt; au stand du pôle de compétition &lt;a class=&quot;reference&quot; href=&quot;http://www.systematic-paris-region.org/&quot;&gt;System&amp;#64;tic&lt;/a&gt; dont nous faisons parti. C&#39;est le stand B4/B8, assez prêt de l&#39;entrée sur la gauche (&lt;a class=&quot;reference&quot; href=&quot;http://www.solutionslinux.fr/exposant_fiche.php?id=804&amp;amp;pg=2_4&quot;&gt;détails&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Nous allons présenter &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; à plusieurs reprises sur le stand, ainsi que lors des conférences sur le Web2 ce mardi 31 mars de 14h à 17h30 :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Adrien présentera &amp;quot;Simile Widgets, des composants de haut niveau pour IHM web&amp;quot;&lt;/li&gt;
&lt;li&gt;Sylvain présentera &amp;quot;Cubic 3.0 - une plateforme pour les applications web sémantique&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;pour plus de détails consultez le &lt;a class=&quot;reference&quot; href=&quot;http://www.confsolutionslinuxparis.com/programme/&quot;&gt;programme&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2009-03-31T10:00-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8813</guid>
  <title>Pylint at BayPIGgies</title>
  <link>http://www.logilab.org/blogentry/8813</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://farm4.static.flickr.com/3232/3140527012_23d9d97f69_m_d.jpg&quot; class=&quot;align-right&quot; src=&quot;http://farm4.static.flickr.com/3232/3140527012_23d9d97f69_m_d.jpg&quot; /&gt;
&lt;p&gt;I am pleased to announce that Pylint was presented during a Tools night meeting organized by &lt;a class=&quot;reference&quot; href=&quot;http://baypiggies.net/new/plone&quot;&gt;BayPIGgies&lt;/a&gt; on thursday march 26th.
This meeting has been recorded and you can enjoy the &lt;a class=&quot;reference&quot; href=&quot;http://glenjarvis.com/static/media/videos/2009_03_27/02_pylint.mov&quot;&gt;video&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One point was missing from the presentation and I&#39;ll take the opportunity now to mention it. &lt;a class=&quot;reference&quot; href=&quot;http://flymake.sourceforge.net/&quot;&gt;Flymake&lt;/a&gt;, an on-the-fly syntax checker for GNU Emacs which has been discussed, does work in combination with Pylint (please see &lt;a class=&quot;reference&quot; href=&quot;http://www.emacswiki.org/emacs/PythonMode#toc6&quot;&gt;EmacsWiki&lt;/a&gt; for more informations).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;photo by&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/tensafefrogs/&quot;&gt;ten safe frogs&lt;/a&gt; &lt;em&gt;under&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by/2.0/&quot;&gt;creative commons&lt;/a&gt;&lt;/p&gt;
</description>
  <dc:date>2009-03-31T00:42-01:00</dc:date>
  <dc:creator>Sandrine Ribeau</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8758</guid>
  <title>new pylint / astng / common releases</title>
  <link>http://www.logilab.org/blogentry/8758</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://janckos.net/blog/wp-content/uploads/2008/08/python.png&quot; class=&quot;align-left&quot; src=&quot;http://janckos.net/blog/wp-content/uploads/2008/08/python.png&quot; /&gt;
&lt;p&gt;I&#39;m pleased to announce releases of pylint 0.18, logilab-astng
0.19 and logilab-common 0.39.  All these packages should now be
cleanly available through easy install.&lt;/p&gt;
&lt;p&gt;Also, happy pylint users will get:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;fixed python 2.6 support (pylint/astng tested from 2.4 to 2.6)&lt;/li&gt;
&lt;li&gt;get source code (and so astng) for zip/egg imports&lt;/li&gt;
&lt;li&gt;some understanding of the property decorator and of unbound methods&lt;/li&gt;
&lt;li&gt;some false positives fixed and others minor improvments&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See projects home page and ChangeLog for more information:&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;http://www.logilab.org/project/pylint&lt;/a&gt;
&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;http://www.logilab.org/project/logilab-astng&lt;/a&gt;
&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-common&quot;&gt;http://www.logilab.org/project/logilab-common&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please report any problem / question to the &lt;a class=&quot;reference&quot; href=&quot;mailto:python-projects&amp;#64;lists.logilab.org&quot;&gt;python-projects&amp;#64;lists.logilab.org&lt;/a&gt;
mailing-list.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
  <dc:date>2009-03-25T11:37-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8754</guid>
  <title>broken easy_install support</title>
  <link>http://www.logilab.org/blogentry/8754</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://3.bp.blogspot.com/_lh41g82r7rk/SHIY6tMEk-I/AAAAAAAAABQ/Xh33EO1oa-U/s200/system-software-install48b.png&quot; class=&quot;align-right&quot; src=&quot;http://3.bp.blogspot.com/_lh41g82r7rk/SHIY6tMEk-I/AAAAAAAAABQ/Xh33EO1oa-U/s200/system-software-install48b.png&quot; /&gt;
&lt;p&gt;I recently understood why &lt;cite&gt;easy_install&lt;/cite&gt; wasn&#39;t able to find so many of our packages anymore.&lt;/p&gt;
&lt;p&gt;The problem was due to a recent change on our website. The project page was ajaxified, and since &lt;cite&gt;easy_install&lt;/cite&gt; uses some screenscrapping techniques to get distribution archives, it can not find the files it is looking for.&lt;/p&gt;
&lt;p&gt;To fix this, we should make our tarballs downloadable from PyPI, by using&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
python setup.py register sdist upload
&lt;/pre&gt;
&lt;p&gt;instead of the current:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
python setup.py register
&lt;/pre&gt;
&lt;p&gt;Uploading our public python software packages to PyPI will make them &lt;cite&gt;easy_installable&lt;/cite&gt; in a breeze !&lt;/p&gt;
</description>
  <dc:date>2009-03-25T10:12-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8554</guid>
  <title>Pylint and Astng support for the _ast module</title>
  <link>http://www.logilab.org/blogentry/8554</link>
  <description>&lt;div class=&quot;section&quot; id=&quot;supporting-ast-and-compiler&quot;&gt;
&lt;h3&gt;&lt;a&gt;Supporting _ast and compiler&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Python 2.5 introduces a new module &lt;cite&gt;_ast&lt;/cite&gt;
for Abstract Syntax Tree (AST) representation of python code.
This module is quite faster than the &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/doc/2.5/lib/module-compiler.ast.html&quot;&gt;compiler.ast&lt;/a&gt; representation that
&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;logilab-astng&lt;/a&gt; (and therefore &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;pylint&lt;/a&gt;) used until now and the &lt;cite&gt;compiler&lt;/cite&gt;
module was removed in Python 3.0.&lt;/p&gt;
&lt;p&gt;Faster is good, but the representations of python code are quite different in
&lt;cite&gt;_ast&lt;/cite&gt; and in &lt;cite&gt;compiler&lt;/cite&gt; : some nodes exist in one AST but not the other and
almost all child nodes have different names.&lt;/p&gt;
&lt;p&gt;We had to engage in a big refactoring to use the new &lt;cite&gt;_ast&lt;/cite&gt; module,
since we wanted to stay compatible with python version &amp;lt; 2.5,
which meant keeping the &lt;cite&gt;compiler&lt;/cite&gt; module support. A lot of work was done
to find a common representation for the two different trees.
In most cases we used &lt;cite&gt;_ast&lt;/cite&gt;-like representations and names, but in some
cases we kept ideas or attribute names of &lt;cite&gt;compiler&lt;/cite&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;abstract-syntax-trees&quot;&gt;
&lt;h3&gt;&lt;a&gt;Abstract Syntax Trees&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Let&#39;s look at an example to compare both representations.
Here is a seamingly harmless snippet of code:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;CODE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;if cond:&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;    del delvar&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;elif next:&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;    print&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now, compare the respective &lt;cite&gt;_ast&lt;/cite&gt; and &lt;cite&gt;compiler&lt;/cite&gt; representations
(nodes are in upper case and their attributes are in lower case).&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;compiler-representation&quot;&gt;
&lt;h4&gt;&lt;a&gt;compiler representation&lt;/a&gt;&lt;/h4&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Module
    node =
    Stmt
        nodes = [
        If
            tests = [
            Name
                name = &#39;cond&#39;
            Stmt
                nodes = [
                AssName
                    flags = &#39;OP_DELETE&#39;
                    name = &#39;delvar&#39;
                ]
            Name
                name = &#39;next&#39;
            Stmt
                nodes = [
                Printnl
                ]
            ]
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;ast-representation&quot;&gt;
&lt;h4&gt;&lt;a&gt;_ast representation&lt;/a&gt;&lt;/h4&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Module
    body = [
    If
        test =
        Name
            id = &#39;cond&#39;
        body = [
        Delete
            targets = [
            Name
                id = &#39;delvar&#39;
            ]
        ]
        orelse = [
        If
            test =
            Name
                id = &#39;next&#39;
            body = [
            Print
                nl = True
            ]
        ]
    ]
&lt;/pre&gt;
&lt;p&gt;Can you spot any differences? I would say, they differ quite a lot...
For instance, &lt;cite&gt;compiler&lt;/cite&gt; turns a &amp;quot;elif&amp;quot; statements into a list called
&#39;tests&#39; when &lt;cite&gt;_ast&lt;/cite&gt; treats &amp;quot;elif cond:&amp;quot; as if it were &amp;quot;else:if cond:&amp;quot;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;tree-rebuilding&quot;&gt;
&lt;h3&gt;&lt;a&gt;Tree Rebuilding&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We transform these trees by renaming attributes and nodes, or removing or introducing
new ones: with &lt;em&gt;compiler&lt;/em&gt;, we remove the &lt;em&gt;Stmt&lt;/em&gt; node,
introduce a &lt;em&gt;Delete&lt;/em&gt; node, and recursively build the &lt;em&gt;If&lt;/em&gt; nodes coming
from an &amp;quot;elif&amp;quot;; and with &lt;em&gt;_ast&lt;/em&gt;, we reintroduce the &lt;em&gt;AssName&lt;/em&gt; node.
This might be only a temporary step towards full &lt;em&gt;_ast&lt;/em&gt; like representation.&lt;/p&gt;
&lt;p&gt;This is done by the &lt;cite&gt;TreeRebuilder&lt;/cite&gt; Visitors, one for each representation,
which are respectively in &lt;cite&gt;astng._nodes_compiler&lt;/cite&gt; and &lt;cite&gt;astng._ast&lt;/cite&gt;.&lt;/p&gt;
&lt;p&gt;In the simplest case, the &lt;cite&gt;TreeRebuilder&lt;/cite&gt; method looks like this
(_nodes_compiler):&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;visit_list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nodes&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;del&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nodes&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(and nothing to do for _ast).&lt;/p&gt;
&lt;p&gt;So, after doing all this and a lot more, we get the following
representation from both input trees:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Module()
    body = [
    If()
        test =
        Name(cond)
        body = [
        Delete()
            targets = [
            DelName(delvar)
            ]
        ]
        orelse = [
        If()
            test =
            Name(next)
            body = [
            Print()
                dest =
                None
                values = [
                ]
            ]
            orelse = [
            ]
        ]
    ]
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;faster-towards-py3k&quot;&gt;
&lt;h3&gt;&lt;a&gt;Faster towards Py3k&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Of course, you can imagine these modifications had some API
repercussions, and thus required a lot of smaller Pylint modifications.
But all was done so that you should see no difference in Pylint&#39;s behavior
using either python &amp;lt;2.5 or python &amp;gt;=2.5, except that with the &lt;cite&gt;_ast&lt;/cite&gt;
module pylint is around two times faster!&lt;/p&gt;
&lt;p&gt;Oh, and we fixed small bugs on the way and maybe introduced a few new ones...&lt;/p&gt;
&lt;p&gt;Finally, it is a major step towards Pylint Py3k!&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-03-19T18:16-01:00</dc:date>
  <dc:creator>Emile Anclin</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8450</guid>
  <title>hgview 0.10.2 released</title>
  <link>http://www.logilab.org/blogentry/8450</link>
  <description>&lt;p&gt;I have the pleasure of announcing that the version &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview&quot;&gt;hgview&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/0.10.2&quot;&gt;0.10.2&lt;/a&gt; was posted on this site and is available for &lt;a class=&quot;reference&quot; href=&quot;http://ftp.logilab.org/pub/hgview/hgview-0.10.2.tar.gz&quot;&gt;downloading&lt;/a&gt;.
In this version we added some new functionalities like :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Change the search behavior: the button &amp;quot;Next&amp;quot; will move the focus on the next found searched text.&lt;/li&gt;
&lt;li&gt;Diff works on the merge node.&lt;/li&gt;
&lt;li&gt;The command --version shows the current version of hgview&lt;/li&gt;
&lt;li&gt;Fix a bug when the file&#39;s name contains space.&lt;/li&gt;
&lt;/ul&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; class=&quot;align-right&quot; src=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; /&gt;
</description>
  <dc:date>2009-03-13T09:13-01:00</dc:date>
  <dc:creator>Graziella Toutoungis</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8381</guid>
  <title>New version of projman</title>
  <link>http://www.logilab.org/blogentry/8381</link>
  <description>&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/projman&quot;&gt;Projman&lt;/a&gt; is a project management tool. It reads project descriptions and activity logs to schedule tasks and to generate gantt diagrams.&lt;/p&gt;
&lt;p&gt;The version 0.13.6 fix some gantt diagram generation bugs. Graphics library helper is now &lt;a class=&quot;reference&quot; href=&quot;http://cairographics.org/&quot;&gt;Cairo&lt;/a&gt; instead of &lt;a class=&quot;reference&quot; href=&quot;http://matplotlib.sourceforge.net/&quot;&gt;matplotlib&lt;/a&gt;. Some examples, according to the new model (use of resources type and roles in tasks) have been added to the project.&lt;/p&gt;
&lt;p&gt;And, of course, the compulsory screenshot.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.logilab.org/image/8387?vid=download&quot; class=&quot;align-center&quot; src=&quot;http://www.logilab.org/image/8387?vid=download&quot; /&gt;&lt;/div&gt;
</description>
  <dc:date>2009-03-10T14:14-01:00</dc:date>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/8048</guid>
  <title>Belier - le ssh par hops</title>
  <link>http://www.logilab.org/blogentry/8048</link>
  <description>&lt;p&gt;On vient de découvrir &lt;a class=&quot;reference&quot; href=&quot;http://www.ohmytux.com/belier/&quot;&gt;belier&lt;/a&gt; qui permet de se connecter facilement à des machines auquelles on doit accéder par des machines ssh intermédiaires. Ca peut s&#39;avérer utile. En plus, c&#39;est en &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org&quot;&gt;python&lt;/a&gt;. En plus, il a fait des paquets &lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org&quot;&gt;debian&lt;/a&gt;... et en plus il mentionne &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;pylint&lt;/a&gt;. Du coup il mérite mention ici.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.ohmytux.com/belier/images/schema_belier.png&quot; class=&quot;align-center&quot; src=&quot;http://www.ohmytux.com/belier/images/schema_belier.png&quot; /&gt;&lt;/div&gt;
</description>
  <dc:date>2009-02-17T16:54-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/7969</guid>
  <title>Debian Lenny release date - almost there ?</title>
  <link>http://www.logilab.org/blogentry/7969</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://www.debian.org/logos/openlogo-nd-50.png&quot; class=&quot;align-left&quot; src=&quot;http://www.debian.org/logos/openlogo-nd-50.png&quot; /&gt;
&lt;p&gt;Being big fans of debian, we are impatiently awaiting the new stable release of the distribution : lenny. Finding it pretty difficult to find information about when they were expecting to release it, I asked a colleague if he knew. He&#39;s a &lt;a class=&quot;reference&quot; href=&quot;http://qa.debian.org/developer.php?login=afayolle&amp;#64;debian.org&quot;&gt;debian developer&lt;/a&gt; so I though he might have the info. And he did : according to the debian.devel mailing list we should be having the release for the 14th of February 2009. In other words : &lt;strong&gt;in 5 days!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://thread.gmane.org/gmane.linux.debian.devel.announce/1318&quot;&gt;http://thread.gmane.org/gmane.linux.debian.devel.announce/1318&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There&#39;s a few geeky emails on the release date if you have time to read the threads.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.sinologic.net/wp-content/uploads/2008/08/lenny_debian.jpg&quot; class=&quot;align-center&quot; src=&quot;http://www.sinologic.net/wp-content/uploads/2008/08/lenny_debian.jpg&quot; /&gt;&lt;/div&gt;
</description>
  <dc:date>2009-02-09T15:38-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/7867</guid>
  <title>LUTIN77: Logilab Unit Test IN fortran 77</title>
  <link>http://www.logilab.org/blogentry/7867</link>
  <description>&lt;p&gt;We&#39;ve just released a new project on logilab.org : lutin77. It&#39;s a test framework for Fortran77.&lt;/p&gt;
&lt;p&gt;The goal of this framework is to make unit tests in fortran 77 by having few dependencies: a POSIX environment with C and fortran 77 compilers. Of course, you can use it for making integration or acceptance tests too. The 0.1 version has just been released here: &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/lutin77&quot;&gt;http://www.logilab.org/project/lutin77&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you are new to the unit tests way of building software, I must admit it lacks examples. For an introduction to the techniques involved, you can have a look at &lt;a class=&quot;reference&quot; href=&quot;http://www.mockobjects.com/book/&quot;&gt;Growing Object-Oriented Software, Guided by Tests&lt;/a&gt; even if mocked subroutines will be for later. But remember that if you do not like to write tests, you are probably not writing unit tests.&lt;/p&gt;
</description>
  <dc:date>2009-01-28T15:19-01:00</dc:date>
  <dc:creator>Andre Espaze</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/7831</guid>
  <title>Résumé de la rencontre francophone autour des forges du 21 janvier 2009</title>
  <link>http://www.logilab.org/blogentry/7831</link>
  <description>&lt;div class=&quot;section&quot; id=&quot;definition-d-une-forge&quot;&gt;
&lt;h3&gt;&lt;a&gt;Définition d&#39;une forge&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Je vous propose tout d&#39;abord une définition assez complète d&#39;une forge logicielle.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;« Une forge ou plate-forme d&#39;hébergement de projets logiciels est un ensemble réunissant les technologies du travail coopératif et du génie logiciel pour permettre le développement coordonné de logiciels en équipe. Les services de base d&#39;une telle plate-forme sont axés sur le partage de fichiers (code source, données et exécutables) et l&#39;animation du groupe. Ils permettent la rédaction et la programmation collaborative, et facilitent la communication dans le groupe grâce à des outils associés aux projets tels que des gestionnaires de listes de messagerie, des logiciels de suivi des tâches et de gestion des rapports d&#39;anomalies. L&#39;utilisation d&#39;une plate-forme de ce type améliore la qualité des réalisations en accélérant les processus d&#39;échange entre développeurs et les cycles de version des logiciels, tout en facilitant l&#39;implication des utilisateurs dans la détection des erreurs ou la mise en lumière des fonctionnalités pertinentes des logiciels.»&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Tirée de http://overcrowded.anoptique.org/ForgesEtatArt (licence Art Libre, créateur initial Benoît Sibaud, diffusable sous LAL, CC By, CC By-SA et GFDL).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Voir:&lt;/em&gt;&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://wiki.planetforge.org&quot;&gt;http://wiki.planetforge.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://fr.wikipedia.org/wiki/Forge_(informatique&quot;&gt;http://fr.wikipedia.org/wiki/Forge_(informatique&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://qsos.org/o3s/set_weighting.php?family=forge&quot;&gt;http://qsos.org/o3s/set_weighting.php?family=forge&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;problemes-recenses&quot;&gt;
&lt;h3&gt;&lt;a&gt;Problèmes recensés&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;right&quot; alt=&quot;image by http://flickr.com/photos/fastjack/ under creative commons&quot; class=&quot;align-right&quot; src=&quot;http://farm1.static.flickr.com/113/282707058_02305d3cce_t.jpg&quot; /&gt;
&lt;p&gt;Je liste ici quelques problèmes qui m&#39;ont semblé émerger pendant les discussions de la journée.&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;forks nombreux du projet GForge avec peu de collaboration entre les projets&lt;/li&gt;
&lt;li&gt;périmètre technique souvent imposé dans le débat; ce qui gêne la définition fonctionnelle d&#39;une forge&lt;/li&gt;
&lt;li&gt;forte hiérarchie des responsabilités avec un rôle &#39;développeur&#39; limité au profit de celui du &#39;chef de projet&#39;&lt;/li&gt;
&lt;li&gt;très orienté web avec une stratégie d&#39;intégration de produits tiers; d&#39;où une situation délicate pour l&#39;homogénéité des solutions à cause des limitations du protocole HTTP&lt;/li&gt;
&lt;li&gt;la méthodologie de conception des logiciels n&#39;est pas évoquée dans le choix d&#39;une solution (et pas d&#39;approche Agile en général).&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;presentations&quot;&gt;
&lt;h3&gt;&lt;a&gt;Présentations&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;alm-cycle-de-vie-des-logiciels-et-poste-client&quot;&gt;
&lt;h4&gt;&lt;a&gt;ALM, cycle de vie des logiciels et poste client&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Voir:&lt;/em&gt;&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Application_Lifecycle_Management&quot;&gt;http://en.wikipedia.org/wiki/Application_Lifecycle_Management&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://gforge.org/themes/gforgegroup/images/logo.jpg&quot; class=&quot;align-right&quot; src=&quot;http://gforge.org/themes/gforgegroup/images/logo.jpg&quot; /&gt;
&lt;div class=&quot;section&quot; id=&quot;projet-novaforge&quot;&gt;
&lt;h5&gt;&lt;a&gt;Projet NovaForge&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;Forge très aboutie où une approche MDA a été mise en oeuvre pour la génération de cas de tests à partir des cas d&#39;utilisation décrits en UML.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;integration-continue&quot;&gt;
&lt;h5&gt;&lt;a&gt;Intégration continue&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;Plusieurs outils ont été nommés. J&#39;ai placé la liste sur la page du &lt;a class=&quot;reference&quot; href=&quot;http://wiki.planetforge.org/index.php/Intégration_continue&quot;&gt;wiki&lt;/a&gt; dédiée.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;interoperabilite-semantique&quot;&gt;
&lt;h4&gt;&lt;a&gt;Interopérabilité sémantique&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;section&quot; id=&quot;projet-xfmigration&quot;&gt;
&lt;h5&gt;&lt;a&gt;Projet xfmigration&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;Ce projet vise à migrer le contenu d&#39;une forge (BerliOS) vers GForge sans passer par le backend SGBD.
L&#39;idée est alors d&#39;utiliser différentes ontologies pour &#39;mapper&#39; les concepts des 2 forges.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Cross-Forge Migration Tool is a concept for facilitating the migration process of project metadata between forge platforms. It uses SWRL rules for mapping and OWL-S standard for exporting mapping results.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Voir:&lt;/em&gt;&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;https://developer.berlios.de/projects/xfmigration/&quot;&gt;https://developer.berlios.de/projects/xfmigration/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.qualipso.org/sites/default/files/QUALIPSO_A3_WP32_XFMigration_Paris2009.pdf&quot;&gt;http://www.qualipso.org/sites/default/files/QUALIPSO_A3_WP32_XFMigration_Paris2009.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;https://developer.berlios.de/projects/a3-a4-xfsearch/&quot;&gt;https://developer.berlios.de/projects/a3-a4-xfsearch/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www-public.it-sudparis.eu/~berger_o/A3_WP32_XFSearch.odp&quot;&gt;http://www-public.it-sudparis.eu/~berger_o/A3_WP32_XFSearch.odp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://qualipso.org/next_generation_forge&quot;&gt;http://qualipso.org/next_generation_forge&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;projet-helios&quot;&gt;
&lt;h5&gt;&lt;a&gt;Projet HELIOS&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;L&#39;exposé présentait un cas d&#39;utilisation du web sémantique pour la recherche et le tri de rapport d&#39;anomalies sur des forges séparées. L&#39;exemple utilisé a été de pouvoir rapatrier; puis sélectionner des tickets relatifs au projet Konqueror à travers le bugzilla de Debian et celui du projet lui-même. Il est ainsi possible de détecter certains doublons ou incohérences de versions.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.cubicweb.org/index-cubicweb.png&quot; class=&quot;align-right&quot; src=&quot;http://www.cubicweb.org/index-cubicweb.png&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;projet-cubicweb-forge&quot;&gt;
&lt;h5&gt;&lt;a&gt;Projet CubicWeb forge&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;J&#39;ai pu présenter le framework &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; et son architecture de &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/&quot;&gt;composants&lt;/a&gt;. La présentation n&#39;étant pas prévue initialement mais j&#39;ai pû faire une démonstration à partir de la &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/&quot;&gt;forge publique de Logilab&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;À partir d&#39;un &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/schema&quot;&gt;schéma&lt;/a&gt; enrichi des &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/&quot;&gt;composants&lt;/a&gt; installés, il est possible de faire des requêtes RQL (similaire à SPARQL) sur des entités et des sources distantes (Base de données, LDAP, subversion, ...). Logilab travaille aujourd&#39;hui à l&#39;ajout d&#39;&lt;a class=&quot;reference&quot; href=&quot;http://wiki.planetforge.org/index.php/Ontologies&quot;&gt;ontologies&lt;/a&gt; dans la manipulation de ce &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/schema&quot;&gt;schéma&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;remerciements&quot;&gt;
&lt;h3&gt;&lt;a&gt;Remerciements&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Je remercie les organisateurs de cette rencontre édition 2009 ainsi que l&#39;ensemble des intervenants propices à l&#39;échange de points de vue.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2009-01-27T20:02-01:00</dc:date>
  <dc:creator>Julien Jehannet</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/7683</guid>
  <title>Apycot big version change</title>
  <link>http://www.logilab.org/blogentry/7683</link>
  <description>&lt;p&gt;The version convention that we use is pretty straight forward and standard : it&#39;s composed of 3 numbers separated by dots. What are the rules to incrementing each on of these numbers ?&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;The last number is a incremented when bugs are corrected&lt;/li&gt;
&lt;li&gt;The middle number is incremented when stories (functionalities) are implemented to the software&lt;/li&gt;
&lt;li&gt;The first number is incremented when we have a major change of technology&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Well... if you&#39;ve been paying attention, &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot&quot;&gt;apycot&lt;/a&gt; just turned 1.0.0, the major change of technology is that it is now integrated to &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; (instead of just generating html files). So for a project in your forge, you describe the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot&quot;&gt;apycot&lt;/a&gt; configuration for it, and the tests for quality assurance are launched on a regular basis. We&#39;re still in the process of stabilizing it (latest right now it &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot/1.0.5&quot;&gt;1.0.5&lt;/a&gt;), but it already runs on the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/project/cubicweb&quot;&gt;CubicWeb projects&lt;/a&gt;, see the screenshot below :&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.logilab.org/image/7682?vid=download&quot; class=&quot;align-center&quot; src=&quot;http://www.logilab.org/image/7682?vid=download&quot; /&gt;&lt;/div&gt;
&lt;p&gt;You should also know that now &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot&quot;&gt;apycot&lt;/a&gt; has two components : the apycotbot which runs the tests and an cubicweb-apycot which displays the results in cubicweb (download  &lt;a class=&quot;reference&quot; href=&quot;http://ftp.logilab.org/pub/apycot/cubicweb-apycot-1.0.5.tar.gz&quot;&gt;cubicweb-apycot-1.0.5.tar.gz&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://ftp.logilab.org/pub/apycot/apycotbot-1.0.5.tar.gz&quot;&gt;apycotbot-1.0.5.tar.gz&lt;/a&gt;).&lt;/p&gt;
</description>
  <dc:date>2009-01-26T17:12-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/7667</guid>
  <title>We&#39;re now publishing for Ubuntu aswell</title>
  <link>http://www.logilab.org/blogentry/7667</link>
  <description>&lt;a class=&quot;reference image-reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;&lt;img align=&quot;right&quot; alt=&quot;http://www.ubuntu.com/themes/ubuntu07/images/ubuntulogo.png&quot; class=&quot;align-right&quot; src=&quot;http://www.ubuntu.com/themes/ubuntu07/images/ubuntulogo.png&quot; /&gt;&lt;/a&gt;
&lt;p&gt;We&#39;ve always been big fans of &lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org&quot;&gt;debian&lt;/a&gt; here at Logilab. So publishing debian packages for our open source software has always been a priority.&lt;/p&gt;
&lt;p&gt;We&#39;re now a bit involved with &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt;, work with it on some client projects, have a few Ubuntu machines lying around, and we like it too. So we&#39;ve decided to publish our packages for &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt; as well as for &lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org&quot;&gt;debian&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-devtools/0.12.1&quot;&gt;0.12.1&lt;/a&gt; version of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-devtools&quot;&gt;logilab-devtools&lt;/a&gt; we introduced publishing of &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt; packages with lgp (Logilab Packaging) - see &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/6273&quot;&gt;ticket&lt;/a&gt;. Since then, you can add the following &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt; source to your &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt; system&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
deb http://ftp.logilab.org/dists hardy/
&lt;/pre&gt;
&lt;p&gt;For now, only hardy is up and running, give us a shout if you want something else!&lt;/p&gt;
</description>
  <dc:date>2009-01-26T15:55-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/7189</guid>
  <title>Rencontre francophone autour des forges</title>
  <link>http://www.logilab.org/blogentry/7189</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://farm1.static.flickr.com/25/61448490_5f9a023307_m.jpg&quot; class=&quot;align-right&quot; src=&quot;http://farm1.static.flickr.com/25/61448490_5f9a023307_m.jpg&quot; /&gt;
&lt;p&gt;Logilab sera présent le Mercredi 21 janvier à la rencontre francophone autour des forges.
Les présentations et les discussions porteront sur :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;échange de données entre forges, interopérabilité&lt;/li&gt;
&lt;li&gt;définition d’un modèle d’intégration ouvert&lt;/li&gt;
&lt;li&gt;recherche multi-forges&lt;/li&gt;
&lt;li&gt;gestion des permissions et partage d’identités&lt;/li&gt;
&lt;li&gt;interaction entre la forge et le poste client&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Logilab espère ainsi bénéficier de l&#39;expérience de chacun et des pistes d&#39;évolutions pour, à terme, les intégrer dans son projet de forge basé sur &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Toutes les informations de l&#39;événement sont disponibles &lt;a class=&quot;reference&quot; href=&quot;http://wiki.planetforge.org/index.php/Rencontre_forges_2009_01&quot;&gt;ici&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;photo par&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://flickr.com/photos/the-lees/&quot;&gt;StormyDog&lt;/a&gt; &lt;em&gt;sous licence&lt;/em&gt; &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by/2.0/&quot;&gt;Creative Commons&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2009-01-19T12:12-01:00</dc:date>
  <dc:creator>Julien Jehannet</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6903</guid>
  <title>Release of CubicWeb 3.0</title>
  <link>http://www.logilab.org/blogentry/6903</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://www.cubicweb.org/index-cubicweb.png&quot; class=&quot;align-left&quot; src=&quot;http://www.cubicweb.org/index-cubicweb.png&quot; /&gt;
&lt;p&gt;As some readers of this blog may be aware of, Logilab has been developing its own framework since 2001. It evolved over the years trying to reach the main goal (managing and publishing data with style) and to incorporate the goods ideas seen in other Python frameworks Logilab developers had used. Now, companies other than Logilab have started providing services for this framework and it is stable enough for the core team to be confident in recommending it to third parties willing to build on it without suffering from the tasmanian devil syndrom.&lt;/p&gt;
&lt;p&gt;CubicWeb version 3.0 was released on the last day of 2008. That&#39;s 7 years of research and development and (at least) three rewrites that were needed to get this in shape. Enjoy it at &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;http://www.cubicweb.org/&lt;/a&gt; !&lt;/p&gt;
</description>
  <dc:date>2009-01-05T09:48-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6891</guid>
  <title>hgview 0.10.0</title>
  <link>http://www.logilab.org/blogentry/6891</link>
  <description>&lt;p&gt;I have the pleasure of announcing that the version &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview&quot;&gt;hgview&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/0.10.0&quot;&gt;0.10.0&lt;/a&gt; was posted on this site and is available for &lt;a class=&quot;reference&quot; href=&quot;http://ftp.logilab.org/pub/hgview/hgview-0.10.0.tar.gz&quot;&gt;downloading&lt;/a&gt;.
In this version we added some new functionalities like :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;The possibility to order all revisions by date or author or description.....&lt;/li&gt;
&lt;li&gt;Support for localtime.&lt;/li&gt;
&lt;li&gt;Improve the message header when &lt;cite&gt;hg mv&lt;/cite&gt; is used and fix the author base color&lt;/li&gt;
&lt;li&gt;Integration of &lt;a class=&quot;reference&quot; href=&quot;http://www.bitbucket.org/bboissin/hgview/&quot;&gt;bboissin&#39;s fixes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; class=&quot;align-right&quot; src=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; /&gt;
&lt;p&gt;Finally : We have taken into account older versions. As pointed out by some users, mercurial version 1.1.x wasn&#39;t working very well with hgview, so we created patches which have to be applied according to the version of mercurial you are using.&lt;/p&gt;
</description>
  <dc:date>2008-12-30T10:44-01:00</dc:date>
  <dc:creator>Graziella Toutoungis</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6883</guid>
  <title>Pyreverse : UML Diagrams for Python</title>
  <link>http://www.logilab.org/blogentry/6883</link>
  <description>&lt;p&gt;Pyreverse analyses Python code and extracts UML class diagrams
and package depenndencies. Since september 2008 it has been integrated with Pylint (0.15).&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;introduction&quot;&gt;
&lt;h3&gt;&lt;a&gt;Introduction&lt;/a&gt;&lt;/h3&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;Pyreverse builds a diagram representation of the source code with:&lt;/dt&gt;
&lt;dd&gt;&lt;ul class=&quot;first last simple&quot;&gt;
&lt;li&gt;class attributes, if possible with their type&lt;/li&gt;
&lt;li&gt;class methods&lt;/li&gt;
&lt;li&gt;inheritance links between classes&lt;/li&gt;
&lt;li&gt;association links between classes&lt;/li&gt;
&lt;li&gt;representation of Exceptions and Interfaces&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;generation-of-uml-diagrams-with-pyreverse&quot;&gt;
&lt;h3&gt;&lt;a&gt;Generation of UML diagrams with Pyreverse&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The command &lt;strong&gt;pyreverse&lt;/strong&gt; generates the diagrams in all formats that &lt;em&gt;graphviz/dot&lt;/em&gt;
knows, or in &lt;em&gt;VCG&lt;/em&gt; :&lt;/p&gt;
&lt;p&gt;The following command shows what &lt;em&gt;dot&lt;/em&gt; knows:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ dot -Txxx
Format: &amp;quot;xxx&amp;quot; not recognized. Use one of: canon cmap cmapx cmapx_np dia dot
eps fig gd gd2 gif hpgl imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic
plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml vtx wbmp xdot xlib
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;pyreverse&lt;/strong&gt; creates by default two diagrams:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ pyreverse -o png -p Pyreverse pylint/pyreverse/
[...]
creating diagram packages_Pyreverse.png
creating diagram classes_Pyreverse.png
&lt;/pre&gt;
&lt;div class=&quot;handout container&quot;&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;-o :  sets the output format&lt;/li&gt;
&lt;li&gt;-p name : yields the output files packages_name.png and classes_name.png&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;package-diagram&quot;&gt;
&lt;h4&gt;&lt;a&gt;Package Diagram&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;center container&quot;&gt;
&lt;img alt=&quot;[image : packages_Pyreverse.png]&quot; src=&quot;http://www.logilab.org/image/6886?vid=download&quot; /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;class-diagram&quot;&gt;
&lt;h4&gt;&lt;a&gt;Class Diagram&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;center container&quot;&gt;
&lt;a class=&quot;reference image-reference&quot; href=&quot;http://www.logilab.org/image/6887?vid=download&quot;&gt;&lt;img alt=&quot;[image : classes_Pyreverse.png]&quot; src=&quot;http://www.logilab.org/image/6887?vid=download&amp;amp;small=true&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/image/6887?vid=download&quot;&gt;class diagram full size image&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;options&quot;&gt;
&lt;h3&gt;&lt;a&gt;Options&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One can modify the output with following options:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
-a N, -A    depth of research for ancestors
-s N, -S    depth of research for associated classes
-A, -S      all ancestors, resp. all associated
-m[yn]      add or remove the module name
-f MOD      filter the attributes : PUB_ONLY/SPECIAL/OTHER/ALL
-k          show only the classes (no attributes and methods)
-b          show &#39;builtin&#39; objects
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;examples&quot;&gt;
&lt;h3&gt;&lt;a&gt;Examples:&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;general-vue-on-a-module&quot;&gt;
&lt;h4&gt;&lt;a&gt;General Vue on a Module&lt;/a&gt;&lt;/h4&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
pyreverse -ASmy -k -o png pyreverse/main.py -p Main
&lt;/pre&gt;
&lt;div class=&quot;center container&quot;&gt;
&lt;a class=&quot;reference image-reference&quot; href=&quot;http://www.logilab.org/image/6885?vid=download&quot;&gt;&lt;img alt=&quot;[image : classes_Main.png, class diagram with all dependencies]&quot; src=&quot;http://www.logilab.org/image/6885?vid=download&amp;amp;small=true&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/image/6885?vid=download&quot;&gt;full size image&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;handout container&quot;&gt;
With these options you can have a quick vue of the dependencies without
being lost in endless lists of methods and attributes.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;detailed-vue-on-a-module&quot;&gt;
&lt;h4&gt;&lt;a&gt;Detailed Vue on a Module&lt;/a&gt;&lt;/h4&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
pyreverse -c PyreverseCommand -a1 -s1 -f ALL -o png  pyreverse/main.py
&lt;/pre&gt;
&lt;div class=&quot;center container&quot;&gt;
&lt;a class=&quot;reference image-reference&quot; href=&quot;http://www.logilab.org/image/6888?vid=download&quot;&gt;&lt;img alt=&quot;[image : PyreverseCommand.png, pyreverse.diagram.ClassDiagram class diagram with one dependency level]&quot; src=&quot;http://www.logilab.org/image/6888?vid=download&amp;amp;small=true&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/image/6888?vid=download&quot;&gt;module in full size image&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;handout container&quot;&gt;
Show all methods and attributes of the class (&lt;em&gt;-f ALL&lt;/em&gt;).
By default, the class diagram option &lt;em&gt;-c&lt;/em&gt; uses the options
&lt;em&gt;-A, -S, -my&lt;/em&gt;, but here we desactivate them
to get a reasonably small image.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;configuration-file&quot;&gt;
&lt;h3&gt;&lt;a&gt;Configuration File&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can put some options into the file &amp;quot;.pyreverserc&amp;quot; in your home directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exemple&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
--filter-mode=PUB_ONLY --ignore doc --ignore test
&lt;/pre&gt;
&lt;div class=&quot;handout container&quot;&gt;
This will exclude documentation and test files in the &lt;em&gt;doc&lt;/em&gt; and &lt;em&gt;test&lt;/em&gt;
directories. Also, we will see only &amp;quot;public&amp;quot; methods.&lt;/div&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-12-23T17:39-01:00</dc:date>
  <dc:creator>Emile Anclin</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6732</guid>
  <title>Fusionner dans le bon sens avec mercurial</title>
  <link>http://www.logilab.org/blogentry/6732</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; class=&quot;align-right&quot; src=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; /&gt;
&lt;p&gt;Contrairement à ce que l&#39;on pourrait penser a priori, il y a un bon et un mauvais sens pour fusionner deux têtes dans en entrepôt mercurial.&lt;/p&gt;
&lt;p&gt;Prenons un exemple et admettons que l&#39;on parte d&#39;une révision 123. Alfred, Barnabé et Coruscant
font des changements qui produisent l&#39;arbre suivant:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
123 -&amp;gt; 124 -&amp;gt; 125 ---&amp;gt; 126 -&amp;gt; 129 --&amp;gt; 130
                   \-&amp;gt; 127 -&amp;gt; 128 /
&lt;/pre&gt;
&lt;p&gt;Si dans le même temps, Zoé part de la révision 123 et produit l&#39;arbre:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
123 -&amp;gt; 131
&lt;/pre&gt;
&lt;p&gt;quand Zoé va vouloir faire son &lt;cite&gt;hg push&lt;/cite&gt; sur l&#39;entrepôt partagé, elle va avoir le message &amp;quot;ça crée des têtes, est-ce que vous
êtes sûr de vouloir faire ce push&amp;quot;. Zoé va se dire qu&#39;il vaut mieux
commencer par un &#39;pull&#39; et un &#39;merge&#39;, mais c&#39;est là qu&#39;il faut se
méfier.&lt;/p&gt;
&lt;p&gt;En effet, si Zoé est sur la révision 131 et qu&#39;elle fusionne avec 130, le
changeset sera énorme car il contiendra tous les changements qui
permettent de passer de 123 à 130. En revanche, si Zoé passe sur la 130
et fusionne avec la 131, elle n&#39;aura que les changements qu&#39;elle vient
d&#39;apporter. Dans le premier cas, le &#39;merge&#39; sera difficile à comprendre, alors qu&#39;il sera bien plus simple dans le second.&lt;/p&gt;
&lt;p&gt;Au final, comment faire la fusion dans le &amp;quot;bon&amp;quot; sens ?&lt;/p&gt;
&lt;p&gt;1/ &lt;cite&gt;hg push&lt;/cite&gt; -&amp;gt; ah tient, ça crée des têtes, donc je ne le fais pas&lt;/p&gt;
&lt;p&gt;2/ &lt;cite&gt;hg pull -u&lt;/cite&gt; ou &lt;cite&gt;hg pull&lt;/cite&gt; suivi de &lt;cite&gt;hg merge&lt;/cite&gt; -&amp;gt; y&#39;a eu un merge&lt;/p&gt;
&lt;p&gt;3/ &lt;cite&gt;hg status&lt;/cite&gt; -&amp;gt; beaucoup de fichiers modifiés... oulàlà, c&#39;est bizarre je vais regarder&lt;/p&gt;
&lt;p&gt;4/ &lt;cite&gt;hgview&lt;/cite&gt; -&amp;gt; ah oui, sur l&#39;autre tête y&#39;a beaucoup plus de changements,
donc je vais plutôt faire le &#39;merge&#39; dans l&#39;autre sens&lt;/p&gt;
&lt;p&gt;5/ &lt;cite&gt;hg up -C ab123_autre_tete&lt;/cite&gt; -&amp;gt; je me retrouve sur l&#39;autre tête&lt;/p&gt;
&lt;p&gt;6/ &lt;cite&gt;hg merge cd456_ma_tete&lt;/cite&gt; -&amp;gt; un joli &#39;merge&#39;&lt;/p&gt;
&lt;p&gt;7/ &lt;cite&gt;hg status&lt;/cite&gt; -&amp;gt; seulement quelques fichiers modifés, voilà qui est mieux&lt;/p&gt;
&lt;p&gt;8/ &lt;cite&gt;hg ci -m merge&lt;/cite&gt; -&amp;gt; youpi, je valide cette fusion&lt;/p&gt;
&lt;p&gt;9/ &lt;cite&gt;hg push&lt;/cite&gt; -&amp;gt; tagada, je partage avec mes voisins&lt;/p&gt;
&lt;p&gt;Moralité: faites des &lt;cite&gt;hg status&lt;/cite&gt; et des &lt;cite&gt;hgview&lt;/cite&gt; aussi souvent que nécessaire pour préparer vos commits et parvenir à un historique facile à comprendre.&lt;/p&gt;
&lt;p&gt;Remarque: on peut aussi remplacer les étapes 5, 6 et 7 par &lt;cite&gt;hg diff -r ab123_autre_tete -r cd456_ma_tete&lt;/cite&gt; pour afficher le diff de ma_tete par rapport à autre_tete, car l&#39;opération de fusion doit être symétrique et donner le même résultat qu&#39;on la lance depuis l&#39;une ou l&#39;autre tête, même si l&#39;affichage par défaut de &lt;cite&gt;hg status&lt;/cite&gt; et &lt;cite&gt;hg diff&lt;/cite&gt; dépend de la tête qui constitue le premier parent (l&#39;étape 5 ayant justement pour effet de changer ce premier parent).&lt;/p&gt;
</description>
  <dc:date>2008-11-27T14:16-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6731</guid>
  <title>Javascript date support</title>
  <link>http://www.logilab.org/blogentry/6731</link>
  <description>&lt;p&gt;Coming from the python and &lt;tt class=&quot;docutils literal&quot;&gt;mx.DateTime&lt;/tt&gt; world, the javascript &lt;tt class=&quot;docutils literal&quot;&gt;Date&lt;/tt&gt;
object is not really appealing. For me, the most disturbing things
are :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;year&lt;/tt&gt; parameter in the &lt;tt class=&quot;docutils literal&quot;&gt;Date&lt;/tt&gt; constructor is always considered
as a XXe century year if &lt;tt class=&quot;docutils literal&quot;&gt;year&lt;/tt&gt; &amp;lt; 100. (this goes along with the &lt;tt class=&quot;docutils literal&quot;&gt;getYear&lt;/tt&gt; /
&lt;tt class=&quot;docutils literal&quot;&gt;getFullYear&lt;/tt&gt; distinction).&lt;/li&gt;
&lt;li&gt;The inconsistency between months and days indexes : months indexes starts
at 0 whereas days indexes starts at 1.&lt;/li&gt;
&lt;li&gt;The lack of decent &lt;tt class=&quot;docutils literal&quot;&gt;strptime&lt;/tt&gt; / &lt;tt class=&quot;docutils literal&quot;&gt;strftime&lt;/tt&gt; functions (even basic ones
not taking locales into account).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Recently, I&#39;ve worked with the great &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/simile-widgets/&quot;&gt;Timeline&lt;/a&gt; project which makes an
heavy use of dates and I had the need for a &lt;strong&gt;very basic&lt;/strong&gt; &lt;tt class=&quot;docutils literal&quot;&gt;strptime&lt;/tt&gt;
implementation. This can by no mean be considered as a comprehensive
implementation, but it might help so here it is:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
var _DATE_FORMAT_REGXES = {
    &#39;Y&#39;: new RegExp(&#39;^-?[0-9]+&#39;),
    &#39;d&#39;: new RegExp(&#39;^[0-9]{1,2}&#39;),
    &#39;m&#39;: new RegExp(&#39;^[0-9]{1,2}&#39;),
    &#39;H&#39;: new RegExp(&#39;^[0-9]{1,2}&#39;),
    &#39;M&#39;: new RegExp(&#39;^[0-9]{1,2}&#39;)
}

/*
 * _parseData does the actual parsing job needed by `strptime`
 */
function _parseDate(datestring, format) {
    var parsed = {};
    for (var i1=0,i2=0;i1&amp;lt;format.length;i1++,i2++) {
    var c1 = format[i1];
    var c2 = datestring[i2];
    if (c1 == &#39;%&#39;) {
        c1 = format[++i1];
        var data = _DATE_FORMAT_REGXES[c1].exec(datestring.substring(i2));
        if (!data.length) {
            return null;
        }
        data = data[0];
        i2 += data.length-1;
        var value = parseInt(data, 10);
        if (isNaN(value)) {
            return null;
        }
        parsed[c1] = value;
        continue;
    }
    if (c1 != c2) {
        return null;
    }
    }
    return parsed;
}

/*
 * basic implementation of strptime. The only recognized formats
 * defined in _DATE_FORMAT_REGEXES (i.e. %Y, %d, %m, %H, %M)
 */
function strptime(datestring, format) {
    var parsed = _parseDate(datestring, format);
    if (!parsed) {
    return null;
    }
    // create initial date (!!! year=0 means 1900 !!!)
    var date = new Date(0, 0, 1, 0, 0);
    date.setFullYear(0); // reset to year 0
    if (parsed.Y) {
    date.setFullYear(parsed.Y);
    }
    if (parsed.m) {
    if (parsed.m &amp;lt; 1 || parsed.m &amp;gt; 12) {
        return null;
    }
    // !!! month indexes start at 0 in javascript !!!
    date.setMonth(parsed.m - 1);
    }
    if (parsed.d) {
    if (parsed.m &amp;lt; 1 || parsed.m &amp;gt; 31) {
        return null;
    }
    date.setDate(parsed.d);
    }
    if (parsed.H) {
    if (parsed.H &amp;lt; 0 || parsed.H &amp;gt; 23) {
        return null;
    }
    date.setHours(parsed.H);
    }
    if (parsed.M) {
    if (parsed.M &amp;lt; 0 || parsed.M &amp;gt; 59) {
        return null;
    }
    date.setMinutes(parsed.M);
    }
    return date;
}

// and now monkey patch the Timeline&#39;s parser ...
/* provide our own custom date parser since the default
 * one only understands iso8601 and gregorian dates
 */
Timeline.NativeDateUnit.getParser = function(format) {
    if (typeof format == &amp;quot;string&amp;quot;) {
    if (format.indexOf(&#39;%&#39;) != -1) {
        return function(datestring) {
            if (datestring) {
                return strptime(datestring, format);
            }
            return null;
        };
    }
        format = format.toLowerCase();
    }
    if (format == &amp;quot;iso8601&amp;quot; || format == &amp;quot;iso 8601&amp;quot;) {
    return Timeline.DateTime.parseIso8601DateTime;
    }
    return Timeline.DateTime.parseGregorianDateTime;
};
&lt;/pre&gt;
</description>
  <dc:date>2008-11-27T09:51-01:00</dc:date>
  <dc:creator>Adrien Di Mascio</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6718</guid>
  <title>We&#39;re open for a chat</title>
  <link>http://www.logilab.org/blogentry/6718</link>
  <description>&lt;p&gt;We have a public forum that is accessible both using XMPP (jabber) or IRC.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;jabber-xmpp&quot;&gt;
&lt;h3&gt;&lt;a&gt;Jabber / XMPP&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Jabber-bulb.svg/40px-Jabber-bulb.svg.png&quot; class=&quot;align-right&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Jabber-bulb.svg/40px-Jabber-bulb.svg.png&quot; /&gt;
&lt;p&gt;Our jabber server is jabber.logilab.org.&lt;/p&gt;
&lt;p&gt;If you don&#39;t have a jabber account, create one on a server such as &lt;a class=&quot;reference&quot; href=&quot;http://www.jabber.org/&quot;&gt;jabber.org&lt;/a&gt; (here is a list of &lt;a class=&quot;reference&quot; href=&quot;http://www.jabber.org/web/Services&quot;&gt;free jabber services&lt;/a&gt;) or use our &lt;a class=&quot;reference&quot; href=&quot;https://jabber.logilab.org/&quot;&gt;web based client&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once you have a jabber account, come and join us at xmpp://public&amp;#64;conference.jabber.logilab.org&lt;/p&gt;
&lt;p&gt;If you do not know what jabber is, read &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Jabber&quot;&gt;the wikipedia page about jabber&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;irc-international-relay-chat&quot;&gt;
&lt;h3&gt;&lt;a&gt;IRC / International Relay Chat&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Connect to &lt;a class=&quot;reference&quot; href=&quot;irc://irc.logilab.org&quot;&gt;irc://irc.logilab.org&lt;/a&gt; and join #public&lt;/p&gt;
&lt;p&gt;If you do not know what irc is, read &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Internet_Relay_Chat&quot;&gt;the wikipedia page about irc&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-11-25T17:40-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6679</guid>
  <title>DBpedia 3.2 released</title>
  <link>http://www.logilab.org/blogentry/6679</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://wiki.dbpedia.org/images/dbpedia_logo.png&quot; class=&quot;align-right&quot; src=&quot;http://wiki.dbpedia.org/images/dbpedia_logo.png&quot; /&gt;
&lt;p&gt;For those interested in the Semantic Web as much as we are at Logilab, the announce of the new DBpedia release is very good news. Version 3.2 is extracted from the October 2008 Wikipedia dumps and provides three mayor improvements: the &lt;a class=&quot;reference&quot; href=&quot;http://wiki.dbpedia.org/Ontology&quot;&gt;DBpedia Schema&lt;/a&gt; which is a restricted vocabulary extracted from the Wikipedia infoboxes ; RDF links from DBpedia to &lt;a class=&quot;reference&quot; href=&quot;http://blog.dbpedia.org/2008/11/15/dbpedia-is-now-interlinked-with-freebase-links-to-opencyc-updated/&quot;&gt;Freebase&lt;/a&gt;, the open-license database providing about a million of things from various domains ; cleaner abstracts without the traces of Wikipedia markup that made them difficult to reuse.&lt;/p&gt;
&lt;p&gt;DBpedia can be downloaded, queried with SPARQL or linked to via the Linked Data interface. See the &lt;a class=&quot;reference&quot; href=&quot;http://wiki.dbpedia.org/About&quot;&gt;about&lt;/a&gt; page for details.&lt;/p&gt;
&lt;p&gt;It is important to note that ontologies are usually more of a common language for data exchange, meant for broad re-use, which means that they can not enforce too many restrictions. On the opposite, database schemas are more restrictive and allow for more interesting inferences. For example, a database schema may enforce that the Publisher of a Document is a Person, whereas a more general ontology will have to allow for Publisher to be a Person or a Company.&lt;/p&gt;
&lt;p&gt;DBpedia provides its schema and moves forward by adding a mapping from that schema to actual ontologies like &lt;a class=&quot;reference&quot; href=&quot;http://www.umbel.org/&quot;&gt;UMBEL&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://www.opencyc.org/&quot;&gt;OpenCyc&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.mpi-inf.mpg.de/~suchanek/downloads/yago/&quot;&gt;Yago&lt;/a&gt;. This enables DBpedia users to infer from facts fetched from different databases, like DBpedia + Freebase + OpenCyc.
Moreover &#39;checking&#39; DBpedia&#39;s data against ontologies will help detect mistakes or weirdnesses in Wikipedia&#39;s pages. For example, if data extracted from Wikipedia&#39;s infoboxes states that &amp;quot;Paris was_born_in New_York&amp;quot;, reasoning and consistency checking tools will be able to point out that a person may be born in a city, but not a city, hence the above fact is probably an error and should be reviewed.&lt;/p&gt;
&lt;p&gt;With &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt;, one can easily define a schema specific to his domain, then quickly set up a web application and easily publish the content of its database as RDF for a known ontology. In other words, CubicWeb makes almost no difference between a web application and a database accessible thru the web.&lt;/p&gt;
</description>
  <dc:date>2008-11-19T22:59-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6547</guid>
  <title>Semantic Roundup - infos glanées au NextMediaCamp</title>
  <link>http://www.logilab.org/blogentry/6547</link>
  <description>&lt;img alt=&quot;http://barcamp.org/f/NMC.PNG&quot; src=&quot;http://barcamp.org/f/NMC.PNG&quot; /&gt;
&lt;p&gt;Par manque de temps voici les infos en brut glanées jeudi soir dernier au &lt;a class=&quot;reference&quot; href=&quot;http://barcamp.org/NextMediaCamp1&quot;&gt;NextMediaBarCamp&lt;/a&gt; :&lt;/p&gt;
&lt;p&gt;Un &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Barcamp&quot;&gt;BarCamp&lt;/a&gt; c&#39;est assez rigolo, un peu trop de jeune cadres dynamiques en cravate à mon goût, mais bon. Parmi les trois mini-conférences auxquelles j&#39;ai participé, il y avait une sur le web sémantique. Animée en partie par &lt;a class=&quot;reference&quot; href=&quot;http://www.networking-social.com/&quot;&gt;Fabrice Epelboin&lt;/a&gt; qui écrit pour la version française de &lt;a class=&quot;reference&quot; href=&quot;http://fr.readwriteweb.com/&quot;&gt;ReadWriteWeb&lt;/a&gt;, j&#39;ai appris des choses. Pour résumer ce que j&#39;y ai compris : le web sémantique il y a deux approches :&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot;&gt;
&lt;li&gt;soit on pompe le contenu existant et on le transforme en contenu lisible par les machines avec des algorithmes de la mort, comme &lt;a class=&quot;reference&quot; href=&quot;http://www.opencalais.com/&quot;&gt;opencalais&lt;/a&gt; le fait (top-down)&lt;/li&gt;
&lt;li&gt;soit on écrit nous même en web sémantique avec des &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Microformats&quot;&gt;microformats&lt;/a&gt; ensuite les machines liront de plus en plus le web (bottom-up)&lt;/li&gt;
&lt;/ol&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://microformats.org/wordpress/wp-content/themes/microformats/img/logo.gif&quot; class=&quot;align-right&quot; src=&quot;http://microformats.org/wordpress/wp-content/themes/microformats/img/logo.gif&quot; /&gt;
&lt;p&gt;Dans le deuxième cas la difficulté est de faciliter la tache des rédacteurs du web pour qu&#39;ils puissent facilement publier du contenu en web sémantique. Pour cela ces outils sont mentionnés : &lt;a class=&quot;reference&quot; href=&quot;http://www.zemanta.com/&quot;&gt;Zemanta&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;https://addons.mozilla.org/en-US/firefox/addon/3481&quot;&gt;Glue&lt;/a&gt; (de la société &lt;a class=&quot;reference&quot; href=&quot;http://www.adaptiveblue.com/&quot;&gt;AdaptiveBlue&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Tout ça m&#39;a fait penser au fait que si &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt; publie déjà en microformats, il lui manque une interface d&#39;édition à la hauteur des enjeux. Par exemple lorsque l&#39;on tape un article et que l&#39;application a les coordonnées d&#39;une personne metionnée, il fait automagiquement une relation à cet élément. A creuser...&lt;/p&gt;
&lt;p&gt;Sinon sur les autres confs et le futur des médias, selon les personnes présentes, c&#39;est assez glauque : des medias publicitaires, custom-made pour le bonheur de l&#39;individu, où l&#39;on met des sous dans les agrégateurs de contenu plutôt sur des journalistes de terrain. Pour ceux que ça intéresse, j&#39;ai aussi découvert lors de ce BarCamp un &lt;a class=&quot;reference&quot; href=&quot;http://robinsloan.com/epic/&quot;&gt;petit film&lt;/a&gt; &amp;quot;rigolo&amp;quot; qui traite ce sujet préoccupant.&lt;/p&gt;
</description>
  <dc:date>2008-11-12T12:42-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6410</guid>
  <title>Using branches in mercurial</title>
  <link>http://www.logilab.org/blogentry/6410</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://www.logilab.org/image/4873?vid=download&amp;amp;small=true&quot; class=&quot;align-left&quot; src=&quot;http://www.logilab.org/image/4873?vid=download&amp;amp;small=true&quot; /&gt;
&lt;p&gt;The more we use &lt;a class=&quot;reference&quot; href=&quot;http://www.selenic.com/mercurial/wiki/&quot;&gt;mercurial&lt;/a&gt; to manage our code repositories, the more we enjoy its extended functionalities. Lately we&#39;ve been playing and using branches which end up being very useful. We also use &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview&quot;&gt;hgview&lt;/a&gt; instead of the built-in &amp;quot;hg view&amp;quot; command. And its latest &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/hgview/0.9.0&quot;&gt;release&lt;/a&gt; supports the branches functionality, you can filter out the branch you want to look at. Update your installation (apt-get upgrade ?) to enjoy this new functionality... or &lt;a class=&quot;reference&quot; href=&quot;http://ftp.logilab.org/pub/hgview/hgview-0.9.0.tar.gz&quot;&gt;download&lt;/a&gt; it.&lt;/p&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; class=&quot;align-right&quot; src=&quot;http://www.selenic.com/hg-logo/logo-droplets-50.png&quot; /&gt;
</description>
  <dc:date>2008-10-14T12:52-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6198</guid>
  <title>A new way of distributing Python code ?</title>
  <link>http://www.logilab.org/blogentry/6198</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://jonathan.demoutiez.net/images/logos/python.png&quot; class=&quot;align-left&quot; src=&quot;http://jonathan.demoutiez.net/images/logos/python.png&quot; /&gt;
&lt;p&gt;On distutils-sig, the question of distutils/setuptools replacing is frequently raised and a lot of effort is made to find what would be the best way to build and distribute python code.&lt;/p&gt;
&lt;p&gt;I don&#39;t understand the reason why we have a massive coupling between build and distribution (setuptools and pypi to be more precise) and I&#39;m not convinced about this &amp;quot;global&amp;quot; approach. I hope the python community will examine the possibility to change that and split the problem in two distinct projects.&lt;/p&gt;
&lt;p&gt;One of the most successful ideas of Python is its power in extending other languages. And in fact, that&#39;s the major problem to solve for the build area. I&#39;m pretty sure it will take a long time before obtaining a valuable (and widely adopted) solution and this is so complicated that the choice of the building chain should be kept under the responsibility of the upstream maintainers for now (distutils, setuptools, makefile, SCons, ...).&lt;/p&gt;
&lt;p&gt;Concerning the distribution, here are the mandatory features I expect:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;installing source code managing dependencies with foreign contribution&lt;/li&gt;
&lt;li&gt;have binary builds without interaction with the primary host system&lt;/li&gt;
&lt;li&gt;be multi-platform agnostic (Linux, BSD, Windows, Mac, ...)&lt;/li&gt;
&lt;li&gt;clean upgrade/uninstall&lt;/li&gt;
&lt;li&gt;kind of sandboxes for testing and development mode&lt;/li&gt;
&lt;li&gt;no administrator privilege required&lt;/li&gt;
&lt;/ul&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://0install.net/tango/package-x-generic.png&quot; class=&quot;align-right&quot; src=&quot;http://0install.net/tango/package-x-generic.png&quot; /&gt;
&lt;p&gt;I found the &lt;a class=&quot;reference&quot; href=&quot;http://0install.net&quot;&gt;http://0install.net&lt;/a&gt; project homepage and was really impressed by the tons of functionalities already available and the other numerous advantages, like:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;multiple version installation&lt;/li&gt;
&lt;li&gt;reuse external distribution effort (integrate deb, rpm, ...)&lt;/li&gt;
&lt;li&gt;digital signatures&lt;/li&gt;
&lt;li&gt;basic mirroring solution&lt;/li&gt;
&lt;li&gt;notification about software updates&lt;/li&gt;
&lt;li&gt;command line oriented but various GUI exist&lt;/li&gt;
&lt;li&gt;try to follow standards (XDG specifications on freedesktop.org))&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&#39;m questioning seriously why this project could not be considered as a clean and build-independent python packages index system.
Moreover, 0install has already some build capabilities (see 0compile) but the &lt;em&gt;ultimate&lt;/em&gt; reason is that it will largely facilitate migrations when a new python build standard will emerge.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusion&quot;&gt;
&lt;h3&gt;&lt;a&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;0install looks like a mature project driven by smart people and already included in modern distributions.
I&#39;ll definitively give it a try soon.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-09-28T17:02-01:00</dc:date>
  <dc:creator>Julien Jehannet</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/6130</guid>
  <title>Converting excel files to CSV using OpenOffice.org and pyuno</title>
  <link>http://www.logilab.org/blogentry/6130</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://wiki.services.openoffice.org/w/images/6/69/Py-uno_128.png&quot; class=&quot;align-right&quot; src=&quot;http://wiki.services.openoffice.org/w/images/6/69/Py-uno_128.png&quot; /&gt;
&lt;div class=&quot;section&quot; id=&quot;the-task&quot;&gt;
&lt;h3&gt;&lt;a&gt;The Task&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I recently received from a customer a fairly large amount of data, organized in dozens of xls documents, each having dozens of sheets. I need to process this, and in order to ease the manipulation of the documents, I&#39;d rather use standard text files in CSV (Comma Separated Values) format. Of course I didn&#39;t want to spend hours manually converting each sheet of each file to CSV, so I thought this would be a good time to get my hands in &lt;a class=&quot;reference&quot; href=&quot;http://udk.openoffice.org/python/python-bridge.html&quot;&gt;pyUno&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So I gazed over the documentation, found the &lt;a class=&quot;reference&quot; href=&quot;http://wiki.services.openoffice.org/wiki/Calc/API&quot;&gt;Calc&lt;/a&gt; page on the OpenOffice.org wiki, read some sample code and got started.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;the-easy-bit&quot;&gt;
&lt;h3&gt;&lt;a&gt;The easy bit&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The first few lines I wrote were (all imports are here, though some were actually added later).&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logging&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os.path&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;osp&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;time&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;uno&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;convert_spreadsheet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;pass&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:]:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;convert_spreadsheet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;configure_log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getLogger&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setLevel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DEBUG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;handler&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;StreamHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stdout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;handler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;format&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(asctime)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(levelname)-7s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(name)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;] &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(message)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;handler&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setFormatter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Formatter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;configure_log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That was the easy part. In order to write the convert_spreadsheet function, I needed to open the document. And to do that, I need to start OpenOffice.org.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;starting-ooo&quot;&gt;
&lt;h3&gt;&lt;a&gt;Starting OOo&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://www.squaregoldfish.co.uk/software/e17icons/oocalc.png&quot; class=&quot;align-right&quot; src=&quot;http://www.squaregoldfish.co.uk/software/e17icons/oocalc.png&quot; /&gt;
&lt;p&gt;I started by copy-pasting some code I found in another project, which
expected OpenOffice.org to be already started with the -accept
option. I changed that code a bit, so that the function would launch
soffice with the correct options if it could not contact an existing
instance:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;_uno_init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_try_start&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;init python-uno bridge infrastructure&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# Get the uno component context from the PyUNO runtime&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;local_context&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uno&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getComponentContext&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# Get the local Service Manager&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;local_service_manager&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;local_context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ServiceManager&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# Create the UnoUrlResolver on the Python side.&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;local_resolver&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;local_service_manager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;createInstanceWithContext&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;s&quot;&gt;&amp;quot;com.sun.star.bridge.UnoUrlResolver&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;local_context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# Connect to the running OpenOffice.org and get its context.&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# XXX make host/port configurable&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;local_resolver&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# Get the ServiceManager object&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;service_manager&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ServiceManager&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# Create the Desktop instance&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;desktop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;service_manager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;createInstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;com.sun.star.frame.Desktop&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;service_manager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desktop&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;Exception&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__class__&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;endswith&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;NoConnectException&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_try_start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Trying to start UNO server&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;soffice -invisible -accept=&amp;quot;socket,host=localhost,port=2002;urp;&amp;quot;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;status = &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_uno_init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exception&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;UNO server not started, you should fix that now. &amp;quot;&lt;/span&gt;
                              &lt;span class=&quot;s&quot;&gt;&amp;quot;`soffice &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;-accept=socket,host=localhost,port=2002;urp;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;` &amp;quot;&lt;/span&gt;
                              &lt;span class=&quot;s&quot;&gt;&amp;quot;or maybe `unoconv -l` might suffice&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;spreadsheet-conversion&quot;&gt;
&lt;h3&gt;&lt;a&gt;Spreadsheet conversion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Now the easy (sort of, once you start understanding the OOo API): to
load a document, use desktop.loadComponentFromURL(). To get the sheets
of a Calc document, use document.getSheets() (that one was
easy...). To iterate over the sheets, I used a sample from the
&lt;a class=&quot;reference&quot; href=&quot;http://wiki.services.openoffice.org/wiki/Spreadsheet_common&quot;&gt;SpreadsheetCommon&lt;/a&gt; page on the OpenOffice.org wiki.&lt;/p&gt;
&lt;p&gt;Exporting the CSV was a bit more tricky. The function to use is
document.storeToURL(). There are two gotchas, however. The first one,
is that we need to specify a filter, and to parameterize it
correctly. The second one is that the CSV export filter is only able
to export the active sheet, so we need to change the active sheet as
we iterate over the sheets.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;parametrizing-the-export-filter&quot;&gt;
&lt;h4&gt;&lt;a&gt;Parametrizing the export filter&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The parameters are passed in a tuple of PropertyValue uno structures,
as the second argument to the storeToURL method. I wrote a helper
function which accepts any named arguments and convert them to such a
tuple:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;make_property_array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;convert the keyword arguments to a tuple of PropertyValue uno&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    structures&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;array&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iteritems&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;prop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uno&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;createUnoStruct&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;com.sun.star.beans.PropertyValue&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;prop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;prop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;prop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;tuple&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now, what do we put in that array? The answer is in the &lt;a class=&quot;reference&quot; href=&quot;http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options&quot;&gt;FilterOptions&lt;/a&gt;
page of the wiki : The FilterName property is &amp;quot;Text - txt - csv
(StarCalc)&amp;quot;. We also need to configure the filter by using the
FilterOptions property. This is a string of comma separated values&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;ASCII code of field separator&lt;/li&gt;
&lt;li&gt;ASCII code of text delimiter&lt;/li&gt;
&lt;li&gt;character set, use 0 for &amp;quot;system character set&amp;quot;, 76 seems to be UTF-8&lt;/li&gt;
&lt;li&gt;number of first line (1-based)&lt;/li&gt;
&lt;li&gt;Cell format codes for the different columns (optional)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I used the value &amp;quot;59,34,76,1&amp;quot;, meaning I wanted semicolons for
separators, and double quotes for text delimiters.&lt;/p&gt;
&lt;p&gt;Here&#39;s the code:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;convert_spreadsheet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;load a spreadsheet document, and convert all sheets to&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    individual CSV files&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;processing &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;file://&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;osp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;abspath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;export_mask&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;make_export_mask&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# initialize Uno, get a Desktop object&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;service_manager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desktop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_uno_init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# load the Document&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;document&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desktop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;loadComponentFromURL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;_blank&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getCurrentController&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;sheets&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getSheets&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;found &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; sheets&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sheets&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getCount&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;

        &lt;span class=&quot;c&quot;&gt;# iterate on all the spreadsheets in the document&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;enumeration&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sheets&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;createEnumeration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;enumeration&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hasMoreElements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;sheet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;enumeration&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nextElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sheet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;current sheet name is &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;controller&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setActiveSheet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sheet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;outfilename&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;export_mask&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;_&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;storeToURL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;outfilename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                &lt;span class=&quot;n&quot;&gt;make_property_array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FilterName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Text - txt - csv (StarCalc)&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                                    &lt;span class=&quot;n&quot;&gt;FilterOptions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;59,34,76,1&amp;quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;finally&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;make_export_mask&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;convert the url of the input document to a mask for the written&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    CSV file, with a substitution for the sheet name&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    &amp;gt;&amp;gt;&amp;gt; make_export_mask(&amp;#39;file:///home/foobar/somedoc.xls&amp;#39;)&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;#39;file:///home/foobar/somedoc$%s.csv&amp;#39;&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;components&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;.&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;components&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;$&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;components&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;csv&amp;#39;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;.&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;components&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-09-19T14:35-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5930</guid>
  <title>qgpibplotter is (hopefully) working</title>
  <link>http://www.logilab.org/blogentry/5930</link>
  <description>&lt;p&gt;My latest personal project, &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pygpibtoolkit&quot;&gt;pygpibtoolkit&lt;/a&gt;, holds a simple &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/HPGL&quot;&gt;HPGL&lt;/a&gt; plotter trying to emulate the  &lt;a class=&quot;reference&quot; href=&quot;http://www.hpmuseum.net/display_item.php?hw=73&quot;&gt;HP7470A&lt;/a&gt; GPIB plotter, using the very nice and cheap &lt;a class=&quot;reference&quot; href=&quot;http://prologix.googlepages.com/&quot;&gt;Prologix&lt;/a&gt; USB-GPIB dongle.
This tool is (for now) called qgpibplotter (since it is using the &lt;a class=&quot;reference&quot; href=&quot;http://trolltech.com/products/qt/&quot;&gt;Qt4&lt;/a&gt; toolkit).&lt;/p&gt;
&lt;p&gt;Tonight, I took (at last) the time to make it work nicely. Well, nicely with the only device I own which is capable of plotting on the GPIB bus, my &lt;a class=&quot;reference&quot; href=&quot;http://www.home.agilent.com/agilent/product.jspx?cc=US&amp;amp;lc=eng&amp;amp;ckey=3562A:epsg:pro&amp;amp;nid=-536900193.536897245.00&amp;amp;id=3562A:epsg:pro&quot;&gt;HP3562A&lt;/a&gt; DSA.&lt;/p&gt;
&lt;p&gt;Now, you just have to press the &amp;quot;Plot&amp;quot; button of your test equipment, and bingo! you can see the plot on your computer.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.logilab.org/image/5837?vid=download&quot; class=&quot;align-center&quot; src=&quot;http://www.logilab.org/image/5837?vid=download&quot; style=&quot;width: 450px;&quot; /&gt;&lt;/div&gt;
</description>
  <dc:date>2008-09-05T00:41-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5913</guid>
  <title>gajim, dbus and wmii</title>
  <link>http://www.logilab.org/blogentry/5913</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://upload.wikimedia.org/wikipedia/commons/d/de/Gajim.png&quot; class=&quot;align-left&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/d/de/Gajim.png&quot; /&gt;
&lt;p&gt;I&#39;ve been using for a long time a custom version of &lt;a class=&quot;reference&quot; href=&quot;http://www.gajim.org/&quot;&gt;gajim&lt;/a&gt; in order
to make it interact with &lt;cite&gt;wmii&lt;/cite&gt;. More precisely, I have, in my &lt;a class=&quot;reference&quot; href=&quot;http://www.suckless.org/wmii/&quot;&gt;wmii&lt;/a&gt;
status bar, a dedicated log zone where I print notification messages
such as new incoming emails or text received from gajim (with different
colors if special words were cited, etc.).&lt;/p&gt;
&lt;p&gt;I recently decided to throw away my custom gajim and use python and
&lt;a class=&quot;reference&quot; href=&quot;http://www.freedesktop.org/wiki/Software/dbus&quot;&gt;dbus&lt;/a&gt; to achieve the same goal in a cleaner way. A very basic version
can be found in the &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/simpled&quot;&gt;simpled&lt;/a&gt; project. As of now, the only way to get the
code is trhough mercurial:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
hg clone http://www.logilab.org/hg/simpled
&lt;/pre&gt;
&lt;p&gt;The source file is named &lt;tt class=&quot;docutils literal&quot;&gt;gajimnotifier.py&lt;/tt&gt;. In this file, you&#39;ll also find
a version sending messages to Ion&#39;s status bar.&lt;/p&gt;
</description>
  <dc:date>2008-09-02T17:06-01:00</dc:date>
  <dc:creator>Adrien Di Mascio</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5885</guid>
  <title>Command-line graphical user interfaces</title>
  <link>http://www.logilab.org/blogentry/5885</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://azarask.in/gfx/ubiquity_side.png&quot; class=&quot;align-right&quot; src=&quot;http://azarask.in/gfx/ubiquity_side.png&quot; /&gt;
&lt;p&gt;Graphical user interfaces help command discovery, while command-line interfaces help command efficiency. This &lt;a class=&quot;reference&quot; href=&quot;http://blog.mozilla.com/faaborg/2007/07/05/the-graphical-keyboard-user-interface/&quot;&gt;article&lt;/a&gt; tries to explain why. I reached it when reading the list of references from the introduction to &lt;a class=&quot;reference&quot; href=&quot;http://labs.mozilla.com/2008/08/introducing-ubiquity/&quot;&gt;Ubiquity&lt;/a&gt;, which is the best extension to firefox I have seen so far. I expect to start writing Ubiquity commands soon, since I have already been using extensively the &#39;keyword shorcut&#39; functionnality of firefox&#39;s bookmarks and we have already done work in the area of &#39;language interaction&#39;, as they call it at Mozilla Labs, when working with &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/narval&quot;&gt;Narval&lt;/a&gt;. Our Logilab Simple Desktop project, aka &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/simpled&quot;&gt;simpled&lt;/a&gt;, also goes in the same direction since it tries to unify different applications into a coherent work environment by defining basic commands and shorcuts that can be applied everywhere and accessing the rest of the functionnalities via a command-line interface.&lt;/p&gt;
</description>
  <dc:date>2008-09-01T16:07-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5870</guid>
  <title>Is the Openmoko freerunner a computer or a phone ?</title>
  <link>http://www.logilab.org/blogentry/5870</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://wiki.openmoko.org/images/thumb/b/b9/Freerunner02.gif/150px-Freerunner02.gif&quot; class=&quot;align-left&quot; src=&quot;http://wiki.openmoko.org/images/thumb/b/b9/Freerunner02.gif/150px-Freerunner02.gif&quot; /&gt;
&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://www.openmoko.com&quot;&gt;Openmoko Freerunner&lt;/a&gt; is a computer with embedded GSM, accelerometer and GPS. I got mine last week after waiting for a month for the batch to get from Taiwan to the &lt;a class=&quot;reference&quot; href=&quot;http://bearstech.com/shop&quot;&gt;french company&lt;/a&gt; I bought it from. The first thing I had to admit was that some time will pass before it gets confortable to use it as a phone. The current version of the system has many weird things in its user interface and the phone works, but the other end of the call suffers a very unpleasant echo.&lt;/p&gt;
&lt;p&gt;I will try to install &lt;a class=&quot;reference&quot; href=&quot;http://wiki.debian.org/DebianOnFreeRunner&quot;&gt;Debian&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://wiki.openmoko.org/wiki/Qtopia_on_FreeRunner&quot;&gt;Qtopia&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://wiki.openmoko.org/wiki/Om_2008.8&quot;&gt;Om2008.8&lt;/a&gt; to compare them. I also want to quickly get Python scripts to run on it and get back to &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/narval&quot;&gt;Narval&lt;/a&gt; hacking. I had an agent running on a bulky Palm+GPS+radionetwork back in 1999 and I look forward to run on this device the same kind of funny things I was doing in &lt;a class=&quot;reference&quot; href=&quot;http://citeseer.ist.psu.edu/cis?q=chauvat&amp;amp;submit=Search+Citations&amp;amp;cs=1&quot;&gt;AI research&lt;/a&gt; ten years ago.&lt;/p&gt;
</description>
  <dc:date>2008-08-27T14:13-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5773</guid>
  <title>simpled - Simple Desktop project started !</title>
  <link>http://www.logilab.org/blogentry/5773</link>
  <description>&lt;p&gt;I bought last week a new laptop computer that can drive a 24&amp;quot; LCD monitor, which means I do not need my desktop computer any more. In the process of setting up that new laptop, I did what I have been wanting to do for years without finding the time: spending time on my ion3 config to make it more generic and create a small python setup utility that can regenerate it from a template file and a keyboard layout.&lt;/p&gt;
&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/simpled&quot;&gt;simpled&lt;/a&gt; project was born!&lt;/p&gt;
&lt;p&gt;If you take a look at the list of pending tickets, you will guess that I am using a limited number of pieces of software during my work day and tried to configure them so that they share common action/shortcuts. This is what simpled is about: given a keyboard layout generate the config files for the common tools so that action/shortcuts are always on the same key.&lt;/p&gt;
&lt;p&gt;I use ion3, xterm+bash, emacs, mutt, firefox, gajim. Common actions are: open, save, close, move up/down/left/right, new frame or tab, close frame or tab, move to previous or next tab, etc.&lt;/p&gt;
&lt;p&gt;I will give news in this blog from time to time and announce it on mailing lists when version 0.1 will be out. If you want to give it a try, get the code from the mercurial repository.&lt;/p&gt;
</description>
  <dc:date>2008-08-11T14:48-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5723</guid>
  <title>Simile-Widgets</title>
  <link>http://www.logilab.org/blogentry/5723</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://simile.mit.edu/images/logo.png&quot; class=&quot;align-right&quot; src=&quot;http://simile.mit.edu/images/logo.png&quot; /&gt;
&lt;p&gt;While working on knowledge management and semantic web technologies, I came across the &lt;a class=&quot;reference&quot; href=&quot;http://simile.mit.edu/&quot;&gt;Simile&lt;/a&gt; project at MIT a few years back. I even had a demo of the Exhibit widget fetching then displaying data from our semantic web application framework back in 2006 at the Web2 track of Solutions Linux in Paris.&lt;/p&gt;
&lt;p&gt;Now that we are using these widgets when implementing web apps for clients, I was happy to see that the projects got a life of their own outside of MIT and became full-fledged free-software projects hosted on Google Code. See &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/simile-widgets/&quot;&gt;Simile-Widgets&lt;/a&gt; for more details and expect us to provide a debian package soon unless someone does it first.&lt;/p&gt;
&lt;p&gt;Speaking of Debian, here is a nice demo a the Timeline widget presenting the &lt;a class=&quot;reference&quot; href=&quot;http://alioth.debian.org/~lamby-guest/debian-timeline/&quot;&gt;Debian history&lt;/a&gt;.&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://beta.thumbalizr.com/app/thumbs/?src=/thumbs/onl/source/d2/d280583f143793f040bdacf44a39b0d5.png&amp;amp;w=320&amp;amp;q=0&amp;amp;enc=&quot; class=&quot;align-center&quot; src=&quot;http://beta.thumbalizr.com/app/thumbs/?src=/thumbs/onl/source/d2/d280583f143793f040bdacf44a39b0d5.png&amp;amp;w=320&amp;amp;q=0&amp;amp;enc=&quot; /&gt;&lt;/div&gt;
</description>
  <dc:date>2008-08-07T11:17-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5690</guid>
  <title>SciPy and TimeSeries</title>
  <link>http://www.logilab.org/blogentry/5690</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://www.enthought.com/img/scipy-sm.png&quot; class=&quot;align-left&quot; src=&quot;http://www.enthought.com/img/scipy-sm.png&quot; /&gt;
&lt;p&gt;We have been using many different tools for doing statistical analysis with Python, including R, SciPy, specific C++ code, etc. It looks like the growing audience of SciPy is now in movement to have dedicated modules in &lt;a class=&quot;reference&quot; href=&quot;http://scipy.org/&quot;&gt;SciPy&lt;/a&gt; (lets call them &lt;a class=&quot;reference&quot; href=&quot;http://scipy.org/scipy/scikits/&quot;&gt;SciKits&lt;/a&gt;). See this &lt;a class=&quot;reference&quot; href=&quot;http://projects.scipy.org/pipermail/scipy-user/2008-August/017760.html&quot;&gt;thread&lt;/a&gt; in SciPy-user mailing-list.&lt;/p&gt;
</description>
  <dc:date>2008-08-04T10:56-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5675</guid>
  <title>Google Custom Search Engine, for Python</title>
  <link>http://www.logilab.org/blogentry/5675</link>
  <description>&lt;p&gt;A Google custom search engine for Python has been made &lt;a class=&quot;reference&quot; href=&quot;http://www.google.com/coop/cse?cx=002031040340806163079:nkigkp_irqk&quot;&gt;available&lt;/a&gt; by Gerard Flanagan, indexing:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://thehazeltree.org&quot;&gt;The Hazel Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/lib&quot;&gt;The Python standard library docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://wiki.python.org&quot;&gt;The Python wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://pypi.python.org/pypi&quot;&gt;Python Package Index&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://www.logilab.fr/images/python-logo.png&quot; class=&quot;align-center&quot; src=&quot;http://www.logilab.fr/images/python-logo.png&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;using-refinements&quot;&gt;
&lt;h3&gt;&lt;a&gt;Using refinements&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To refine the search to any of the individual sites, you can specify a
refinement using the following labels: stdlib, wiki, pypi,
thehazeltree&lt;/p&gt;
&lt;p&gt;So, to just search the python wiki, you would enter:&lt;/p&gt;
&lt;blockquote&gt;
somesearchterm more:wiki&lt;/blockquote&gt;
&lt;p&gt;and similarly:&lt;/p&gt;
&lt;blockquote&gt;
somesearchterm more:stdlib
somesearchterm more:pypi
somesearchterm more:thehazeltree&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;about-http-thehazeltree-org&quot;&gt;
&lt;h3&gt;&lt;a&gt;About &lt;a class=&quot;reference&quot; href=&quot;http://thehazeltree.org&quot;&gt;http://thehazeltree.org&lt;/a&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://thehazeltree.org/&quot;&gt;The Hazel Tree&lt;/a&gt; is a collection of
popular Python texts that I have converted to reStructuredText and put
together using &lt;a class=&quot;reference&quot; href=&quot;http://sphinx.pocoo.org&quot;&gt;Sphinx&lt;/a&gt;. It&#39;s in a publishable
state, but not as polished as I&#39;d like, and since I&#39;ll be mostly offline for
the next month it will have to remain as it is for the present. However,
the search engine is ready now and the clock is ticking on its  subscription (one year, renewal depending on success of site), so if it&#39;s useful to anyone, it&#39;s all yours (and if you use it on your own site a
link back to &lt;a class=&quot;reference&quot; href=&quot;http://thehazeltree.org&quot;&gt;http://thehazeltree.org&lt;/a&gt; would be appreciated).&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-07-31T10:32-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5656</guid>
  <title>Python for applied Mathematics</title>
  <link>http://www.logilab.org/blogentry/5656</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.ams.org/images/siam2008-brain.jpg&quot; class=&quot;align-right&quot; src=&quot;http://www.ams.org/images/siam2008-brain.jpg&quot; style=&quot;width: 200px; height: 141px;&quot; /&gt;
&lt;p&gt;The presentation of Python as a tool for applied mathematics got &lt;a class=&quot;reference&quot; href=&quot;http://www.ams.org/ams/siam-2008.html#python&quot;&gt;highlighted&lt;/a&gt; at the 2008 annual meeting of the american Society for Industrial and Applied Mathematics (SIAM). For more information, read this &lt;a class=&quot;reference&quot; href=&quot;http://fdoperez.blogspot.com/2008/07/python-tools-for-science-go-to-siam.html&quot;&gt;blogpost&lt;/a&gt; and the &lt;a class=&quot;reference&quot; href=&quot;https://cirl.berkeley.edu/fperez/talks/0807_siam_intro_python_scicomp.pdf&quot;&gt;slides&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2008-07-29T10:17-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5619</guid>
  <title>Windows, fichiers ouverts et tests unitaires</title>
  <link>http://www.logilab.org/blogentry/5619</link>
  <description>&lt;p&gt;Un problème rencontré hier : un test unitaire plante sous Windows, après avoir créé un objet qui garde des fichiers ouverts. le &lt;tt class=&quot;docutils literal&quot;&gt;tearDown&lt;/tt&gt; du test est appelé, mais il plante car Windows refuse de supprimer des fichiers ouverts, et le &lt;em&gt;framework&lt;/em&gt; de test garde une référence sur la fonction de test pour qu&#39;on puisse examiner la pile d&#39;appels. Sous Linux, pas de problème (on a le droit du supprimer du disque un fichier ouvert, et donc pas de soucis dans le teardown).&lt;/p&gt;
&lt;p&gt;Quelques pistes pour contourner le problème:&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot;&gt;
&lt;li&gt;mettre le test dans un &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;try...finally&lt;/span&gt;&lt;/tt&gt; avec un &lt;tt class=&quot;docutils literal&quot;&gt;del&lt;/tt&gt; sur l&#39;objet qui garde les fichiers ouverts dans le &lt;tt class=&quot;docutils literal&quot;&gt;finally&lt;/tt&gt;. Inconvénient : quand le test ne passe pas, &lt;tt class=&quot;docutils literal&quot;&gt;pdb&lt;/tt&gt; ne permet plus de voir grand chose&lt;/li&gt;
&lt;li&gt;au lieu de nettoyer dans le &lt;tt class=&quot;docutils literal&quot;&gt;tearDown&lt;/tt&gt;, nettoyer plus tard dans un &lt;tt class=&quot;docutils literal&quot;&gt;atexit&lt;/tt&gt; par exemple. Il faut voir comment ça se passe si plusieurs tests veulent écrire dans les mêmes fichiers (je pense qu&#39;il faudrait un répertoire temporaire par test, si on veut pouvoir avoir plusieurs tests qui foirent et examiner leurs données, mais il faut tester pour être sûr)&lt;/li&gt;
&lt;li&gt;coller un &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;try...except&lt;/span&gt;&lt;/tt&gt; dans le &lt;tt class=&quot;docutils literal&quot;&gt;tearDown&lt;/tt&gt; autour de la suppression de chaque fichier, et mettre les fichiers qui  posent problème dans une liste qui sera traitée à la sortie du programme (avec &lt;tt class=&quot;docutils literal&quot;&gt;atexit&lt;/tt&gt; par exemple).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ça ressemble à du bricolage, mais on a un comportement de windows sur lequel on n&#39;a pas de contrôle (même avec des privilèges Administrateur ou System, on ne peut pas contourner cette impossibilité de supprimer un fichier ouvert, à ma connaissance).&lt;/p&gt;
&lt;p&gt;Une autre approche, nettement plus lourde, serait de virtualiser la création de fichiers pour travailler en mémoire (au minimum surcharger &lt;tt class=&quot;docutils literal&quot;&gt;os.mkdir&lt;/tt&gt; et le &lt;em&gt;builtin&lt;/em&gt; &lt;tt class=&quot;docutils literal&quot;&gt;open&lt;/tt&gt;, voire dans le cas qui nous intéresse les modules qui travaillent avec des fichiers zip). Il y a peut-être des choses comme ça en circulation. Poser la question sur la liste TIP apportera peut-être des réponses (une rapide recherche dans les archives n&#39;a rien donné).&lt;/p&gt;
&lt;p&gt;Voir aussi ces enfilades de &lt;a class=&quot;reference&quot; href=&quot;http://mail.python.org/pipermail/python-list/2004-March/251897.html&quot;&gt;mars 2004&lt;/a&gt; et &lt;a class=&quot;reference&quot; href=&quot;http://mail.python.org/pipermail/python-list/2004-November/290864.html&quot;&gt;novembre 2004&lt;/a&gt; sur comp.lang.python.&lt;/p&gt;
</description>
  <dc:date>2008-07-22T10:51-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5552</guid>
  <title>ion, dock and screen configuration</title>
  <link>http://www.logilab.org/blogentry/5552</link>
  <description>&lt;p&gt;I have a laptop I use at work (with a docking station), in the train and at home (with an external display), on which my environment is ion3.&lt;/p&gt;
&lt;p&gt;As I use suspend-to-RAM all the time, I have added some keybindings to automatically reconfigure my screen when I plug/unplug an external display (on the dock as well as direct VGA connection).&lt;/p&gt;
&lt;p&gt;The lua code to paste in your &lt;cite&gt;.ion3/cfg_ion.lua&lt;/cite&gt; for the bindings looks like:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
function autoscreen_on()
        local f = io.popen(&#39;/home/david/bin/autoscreen -c&#39;, &#39;r&#39;)
      if not f then
          return
      end
      local s = f:read(&#39;*a&#39;)
      f:close()
    ioncore.restart()
end

function autoscreen_off()
        local f = io.popen(&#39;/home/david/bin/autoscreen -d&#39;, &#39;r&#39;)
      if not f then
          return
      end
      local s = f:read(&#39;*a&#39;)
      f:close()
    ioncore.restart()
end

defbindings(&amp;quot;WMPlex.toplevel&amp;quot;, {
    bdoc(&amp;quot;Turn on any external display and tell ion to reconfigure itself&amp;quot;),
    kpress(META..&amp;quot;F10&amp;quot;,
           &amp;quot;autoscreen_on()&amp;quot;),
})

defbindings(&amp;quot;WMPlex.toplevel&amp;quot;, {
    bdoc(&amp;quot;Turn off any external display and tell ion to reconfigure itself&amp;quot;),
    kpress(META..&amp;quot;F11&amp;quot;,
           &amp;quot;autoscreen_off()&amp;quot;),
})
&lt;/pre&gt;
&lt;p&gt;It makes use of the following python script (named &lt;cite&gt;/home/david/bin/autoscreen&lt;/cite&gt; in the lua code above):&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
#!/usr/bin/env python

import sys
import os
import re
from subprocess import Popen, PIPE
import optparse
parser = optparse.OptionParser(&amp;quot;A simple automatic screen configurator (using xrandr)&amp;quot;)
parser.add_option(&#39;-c&#39;, &#39;--connect&#39;, action=&amp;quot;store_true&amp;quot;,
                  dest=&#39;connect&#39;,
                  default=False,
                  help=&amp;quot;configure every connected screens&amp;quot;)
parser.add_option(&#39;-d&#39;, &#39;--disconnect&#39;, action=&amp;quot;store_true&amp;quot;,
                  dest=&#39;disconnect&#39;,
                  default=False,
                  help=&amp;quot;unconfigure every connected screens other than LVDS (laptop screen)&amp;quot;)
parser.add_option(&#39;&#39;, &#39;--main-display&#39;,
                  dest=&#39;maindisplay&#39;,
                  default=&amp;quot;LVDS&amp;quot;,
                  help=&amp;quot;main display identifier (typically, the laptop LCD screen; defaults to LVDS)&amp;quot;)

options, args = parser.parse_args()

if int(options.connect) + int(options.disconnect) &amp;gt; 1:
    print &amp;quot;ERROR: only one option -c or -d at a time&amp;quot;
    parser.print_help()
    sys.exit(1)


xrandr = Popen(&amp;quot;xrandr&amp;quot;, shell=True, bufsize=0, stdout=PIPE).stdout.read()

connected = re.findall(r&#39;([a-zA-Z0-9-]*) connected&#39;, xrandr)
connected = [c for c in connected if c != options.maindisplay]

cmd = &amp;quot;xrandr --output %s %s&amp;quot;

if options.connect or options.disconnect:
    for c in connected:
        if options.connect:
            action = &amp;quot;--auto&amp;quot;
        elif options.disconnect:
            action = &amp;quot;--off&amp;quot;

        p = Popen(cmd % (c, action), shell=True)
        sts = os.waitpid(p.pid, 0)
&lt;/pre&gt;
</description>
  <dc:date>2008-07-04T16:21-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5531</guid>
  <title>We&#39;re going to Europython&#39;08</title>
  <link>http://www.logilab.org/blogentry/5531</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://europython.org/euro/img/europython.png&quot; class=&quot;align-right&quot; src=&quot;http://europython.org/euro/img/europython.png&quot; /&gt;
&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;We&#39;ve decided to go to &lt;a class=&quot;reference&quot; href=&quot;http://www.europython.org/&quot;&gt;Europython&lt;/a&gt; this year. We&#39;re obviously going to give a talk about the exciting things we&#39;re doing with &lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org&quot;&gt;LAX&lt;/a&gt; and GoogleAppEngine. We&#39;re on wednesday at midday in the alfa room, check out the schedule &lt;a class=&quot;reference&quot; href=&quot;http://registration.europython.eu/timetable.html&quot;&gt;here&lt;/a&gt;. Since we think it&#39;s important that these events take place, we&#39;re also chipping in and &lt;a class=&quot;reference&quot; href=&quot;http://www.europython.org/Sponsors&quot;&gt;sponsoring the event&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We hope to see you there. Drop us a note if you want to meet up.&lt;/p&gt;
</description>
  <dc:date>2008-07-02T11:28-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5501</guid>
  <title>Munin Plugins for Zope</title>
  <link>http://www.logilab.org/blogentry/5501</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://munin.projects.linpro.no/static/munin.png&quot; class=&quot;align-right&quot; src=&quot;http://munin.projects.linpro.no/static/munin.png&quot; /&gt;
&lt;p&gt;Here at Logilab we find &lt;a class=&quot;reference&quot; href=&quot;http://munin.projects.linpro.no/&quot;&gt;Munin&lt;/a&gt; pretty useful. We monitor a lots of machines and a lot of services with it, and it usually gives us pretty useful indicators over time that guide us through to optimizations.&lt;/p&gt;
&lt;p&gt;One of the reasons we adopted this technology is it&#39;s modular approach with the plugin architecture. And when we realized we could write plugins in python, we knew we&#39;d like it. After years of using it, we&#39;re now actually writing plugins for it. Optimizing zope and zeo servers is not an easy task so we&#39;re developping plugins to be able to see the difference between before and after changing things.&lt;/p&gt;
&lt;p&gt;You check out the project &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/munin_zope_plugins&quot;&gt;here&lt;/a&gt;, and download it from the &lt;a class=&quot;reference&quot; href=&quot;ftp://ftp.logilab.fr/pub/munin_zope_plugins/munin_zope_plugins-0.1.0.tar.gz&quot;&gt;ftp&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2008-07-01T12:15-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5343</guid>
  <title>apycot 0.12.1 released</title>
  <link>http://www.logilab.org/blogentry/5343</link>
  <description>&lt;p&gt;After one month of internship at logilab, I&#39;m pleased to announce the 0.12.1 release of apycot.&lt;/p&gt;

&lt;p&gt;for more information read the &lt;a href=&quot;http://lists.logilab.org/pipermail/qa-projects/2008-June/000003.html&quot;&gt;apycot 0.12.1 release note&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also check the new &lt;a href=&quot;https://www.logilab.net/elo/file/5290&quot;&gt;sample configuration&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Pierre-Yves David&lt;/b&gt;&lt;/p&gt;</description>
  <dc:date>2008-06-24T11:35-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5298</guid>
  <title>Instrumentation of google appengine&#39;s datastore.</title>
  <link>http://www.logilab.org/blogentry/5298</link>
  <description>&lt;p&gt;Here is a piece of code I&#39;ve written which I thought may be useful to some other people...&lt;/p&gt;
&lt;p&gt;You&#39;ll find &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/file/5296&quot;&gt;here&lt;/a&gt; a simple python module to use with the Google AppEngine SDK to monkey patch the datastore API in order to get an idea of the calls performed by your application.&lt;/p&gt;
&lt;p&gt;To instrument of the datastore, put at the top level of your handler file&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
import instrdatastore
&lt;/pre&gt;
&lt;p&gt;Note that it&#39;s important to have this before any other import in your application or in the &lt;tt class=&quot;docutils literal&quot;&gt;google&lt;/tt&gt; package to avoid that some modules will use the unpatched version of datastore functions (and hence calls to those functions wouldn&#39;t be considered).&lt;/p&gt;
&lt;p&gt;Then add at the end of your handler function&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
instrdatastore.print_info()
&lt;/pre&gt;
&lt;p&gt;The handler file should look like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;my handler file with datastore instrumenting activated&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;instrdatastore&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# ... other initialization code&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# main function so this handler module is cached&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
  &lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;wsgiref.handlers&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CGIHandler&lt;/span&gt;
  &lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;ginco.wsgi.handler&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ErudiWSGIApplication&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;application&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ErudiWSGIApplication&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vreg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vreg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;CGIHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;application&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;instrdatastore&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print_info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;__main__&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now you should see in your logs the number of Get/Put/Delete/Query which has been done during request processing&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
2008-06-23 06:59:12 - (root) WARNING: datastore access information
2008-06-23 06:59:12 - (root) WARNING: nb Get: 2
2008-06-23 06:59:12 - (root) WARNING: arguments (args, kwargs):
((datastore_types.Key.from_path(&#39;EGroup&#39;, u&#39;key_users&#39;, _app=u&#39;winecellar&#39;),), {})
((datastore_types.Key.from_path(&#39;EUser&#39;, u&#39;key_test&amp;#64;example.com&#39;, _app=u&#39;winecellar&#39;),), {})
2008-06-23 06:59:12 - (root) WARNING: nb Query: 1
2008-06-23 06:59:12 - (root) WARNING: arguments (args, kwargs):
(({&#39;for_user =&#39;: None}, &#39;EProperty&#39;), {})
2008-06-23 06:59:58 - (root) WARNING: nb Put: 1
2008-06-23 06:59:58 - (root) WARNING: arguments (args, kwargs):
(({u&#39;login&#39;: None, u&#39;last_usage_time&#39;: 1214204398.2022741, u&#39;data&#39;: &amp;quot;&amp;quot;},), {})
&lt;/pre&gt;
&lt;p&gt;I&#39;ll probably extend this as the time goes. Also notice you may encounter some problems with the automatic reloading feature of the dev app server when instrumentation is activated, in which case you should simply restart the web server.&lt;/p&gt;
</description>
  <dc:date>2008-06-23T09:11-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5288</guid>
  <title>SciLab passe en logiciel libre</title>
  <link>http://www.logilab.org/blogentry/5288</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://www.scilab.org/images/homepage/scilab_logo.png&quot; class=&quot;align-right&quot; src=&quot;http://www.scilab.org/images/homepage/scilab_logo.png&quot; /&gt;
&lt;p&gt;Bienvenue à SciLab version 5.0 dans le monde du logiciel libre. SciLab 5.0, plateforme open source de calcul scientifique sous licence &lt;a class=&quot;reference&quot; href=&quot;http://www.cecill.info&quot;&gt;CeCill&lt;/a&gt;, est une alternative crédible et maintenant reconnue comme telle à Matlab. Pour assurer le développement pérenne de Scilab, le consortium &lt;a class=&quot;reference&quot; href=&quot;http://www.scilab.org/fr/&quot;&gt;Scilab&lt;/a&gt; rejoint &lt;a class=&quot;reference&quot; href=&quot;http://www.digiteo.fr/accueil_fr.html&quot;&gt;DIGITEO&lt;/a&gt;, parc de recherche d&#39;envergure mondiale dans le domaine des sciences et
technologies de l&#39;information en Île-de-France.&lt;/p&gt;
</description>
  <dc:date>2008-06-16T17:33-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5283</guid>
  <title>First version of LAX Book</title>
  <link>http://www.logilab.org/blogentry/5283</link>
  <description>&lt;p&gt;Previous documentation was merged into a LAX Book now featuring step-by-step screenshots to get up and running faster.&lt;/p&gt;
&lt;blockquote&gt;
&lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org/lax-book&quot;&gt;http://lax.logilab.org/lax-book&lt;/a&gt;&lt;/blockquote&gt;
&lt;p&gt;Don&#39;t we all like screenshots...&lt;/p&gt;
&lt;div align=&quot;center&quot; class=&quot;align-center&quot;&gt;&lt;img alt=&quot;http://lax.logilab.org/images/lax-book.08-schema.en.png&quot; class=&quot;align-center&quot; src=&quot;http://lax.logilab.org/images/lax-book.08-schema.en.png&quot; style=&quot;width: 390px; height: 210px;&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Update: LAX is now included in the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; semantic web framework.&lt;/p&gt;
</description>
  <dc:date>2008-06-16T17:12-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5223</guid>
  <title>Implementing scalable applications with AppEngine</title>
  <link>http://www.logilab.org/blogentry/5223</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://code.google.com/events/images/io_logo_lg.png&quot; class=&quot;align-left&quot; src=&quot;http://code.google.com/events/images/io_logo_lg.png&quot; /&gt;
&lt;p&gt;At Google IO, a large part of the Tools track was dedicated to
AppEngine. Brett Slatkin gave a talk titled &lt;a class=&quot;reference&quot; href=&quot;http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine&quot;&gt;Building scalable Web
Applications with Google AppEngine&lt;/a&gt; which focused on optimizing the
server part of web apps. As other presenters demonstrated it, like
Steve Souders in his talk &lt;a class=&quot;reference&quot; href=&quot;http://sites.google.com/site/io/even-faster-web-sites&quot;&gt;Even Faster Websites&lt;/a&gt;, optimizing the
browser part of webapps is not to be neglected either.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;webscale-applications-require-man-made-optimisation&quot;&gt;
&lt;h3&gt;&lt;a&gt;Webscale applications require man-made optimisation&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First of all, I must confess I am used to repeat that &amp;quot;early
optimisation is the root of all evil&amp;quot; and &amp;quot;delay commitment until the
last responsible time&amp;quot;. But reading about AppEngine and listening to
the Google IO talks, it appears that &lt;strong&gt;the tools we have today ask for
human intervention to reach web-scale performance&lt;/strong&gt;, even when &amp;quot;we&amp;quot;
stands for &amp;quot;Google&amp;quot;.&lt;/p&gt;
&lt;p&gt;In order for web-scale applications to handle the kind of load they
are facing, they must be designed and implemented carefully. As
carefully as any application was designed before the exponential
growth of PC computation power let us move away from low-level
implementation details and made some inefficiencies acceptable as long
as the time spent developing was short enough.&lt;/p&gt;
&lt;p&gt;It all depends on the parameters of your cost function, but for
web-scale applications, it seems like we have not enough computer-time
and can not trade it for human-time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;writes-are-more-expensive-than-reads&quot;&gt;
&lt;h3&gt;&lt;a&gt;Writes are more expensive than reads&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To get a better idea of the work constraints, one should know that a
disk seek is about 10ms, which means there will be a maximum of 100
accesses per second. On the other hand, if we need consistent data as
opposed to transactional data (the latter implying that data is
fetched each time it is asked for), data can be read from disk once
then cached. Following reads are done from memory at a rate of about
4GB/sec, which means 4000 accesses per second if entities are around
1MB in size. Result of this back of the envelope approximation is 40
reads equals one write.&lt;/p&gt;
&lt;p&gt;It follows that, although the actual time depends on the size and shape
of data, &lt;strong&gt;writes are very expensive compared to reads&lt;/strong&gt; and both are
better done in batches to optimise disk access.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;entity-groups-in-appengine&quot;&gt;
&lt;h3&gt;&lt;a&gt;Entity groups in AppEngine&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://code.google.com/appengine/images/noassembly.gif&quot; class=&quot;align-right&quot; src=&quot;http://code.google.com/appengine/images/noassembly.gif&quot; /&gt;
&lt;p&gt;The AppEngine Datastore was designed with this constraints in
mind. Entities are sets of property name/value pairs. Each entity may
have a parent. An entity without a parent is the root of a hierarchy
called an entity group.&lt;/p&gt;
&lt;p&gt;Entities of the same group are stored on disk close to each other, but
two distinct entity groups may be stored on different computers. Read
access to entities of the same group is thus faster than read access
to entities of different groups.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Write access is serialized per entity group&lt;/strong&gt;. As opposed to a
traditionnal RDBMS that provides row locking, the datastore only
provides entity group locking. Writes to the a single entity group
will always happen in sequence, even though changes concern different
entities.&lt;/p&gt;
&lt;p&gt;There is no limit to the number of entity groups or to the number of
entities per group, but because of the locking strategy, large entity
groups will cause high contention and a lot of failed
transactions. Since writes are expensive, not thinking about write
throughput is a very bad idea when designing an AppEngine application
if one want it to scale.&lt;/p&gt;
&lt;p&gt;On the other hand, the parallel nature of the datastore make it scale
wide and there is no limit to the number of entity groups that can be
written to in parallel, nor to the number of reads that can be done in
parallel.&lt;/p&gt;
&lt;p&gt;To understand this design in details, you will have to read about GFS,
BigTable and other technologies developed by Google to implement
large-scale clustering.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;example-of-counters&quot;&gt;
&lt;h3&gt;&lt;a&gt;Example of counters&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;left&quot; alt=&quot;http://code.google.com/apis/gears/resources/database.gif&quot; class=&quot;align-left&quot; src=&quot;http://code.google.com/apis/gears/resources/database.gif&quot; /&gt;
&lt;p&gt;Counters are a good example to address when discussing write
throughput, because the datastore locking strategy makes writing to
global data very expensive.&lt;/p&gt;
&lt;p&gt;Let us assume that we want to display on the main page of a wiki
application the total number of comments posted.&lt;/p&gt;
&lt;p&gt;A global counter would serialize all its updates. If 100 users were to
add comments at the same time, some of them would have to wait several
seconds for their action to complete: one write for the comment, one
write for the counter, at most 100 writes per second for the counter
and a lot of time lost due to failed transaction that need to be
restarted.&lt;/p&gt;
&lt;p&gt;The solution to make the counter scale is to partition it among all
entity groups then sum these partial counters when the global value is
needed.&lt;/p&gt;
&lt;p&gt;Since chances are low that a given user will write more than one
comment at a time, comment entities for a user can be grouped together
and a partial counter can be added to the same entity group. Creating
a new comment and increasing the partial counter will be done in the
same batch.&lt;/p&gt;
&lt;p&gt;When a new request for the main page is received, the counter total is
looked up in the cache. If it is not found, all partial counters are
fetched and summed up, then the cache is refreshed with a short
timeout, for example one minute.&lt;/p&gt;
&lt;p&gt;During the next minute, the counter will be &amp;quot;consistent&amp;quot;, read no too
far-off, and served extremely fast from the cache.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;prevent-repeated-or-unneeded-work&quot;&gt;
&lt;h3&gt;&lt;a&gt;Prevent repeated or unneeded work&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://code.google.com/apis/gears/resources/localserver.gif&quot; class=&quot;align-right&quot; src=&quot;http://code.google.com/apis/gears/resources/localserver.gif&quot; /&gt;
&lt;p&gt;To sum things up, when implementing applications on top of AppEngine
with web-scale usage as a goal, everything that can be done to save
time should be considered. Including the following:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;importing python modules as late as possible will minimize the
python runtime overhead&lt;/li&gt;
&lt;li&gt;retrieving data that is not going to be used is a waste&lt;/li&gt;
&lt;li&gt;repeated queries and queries returning large result sets must be
avoided&lt;/li&gt;
&lt;li&gt;when Get() if sufficient, do not spend time on Query()&lt;/li&gt;
&lt;li&gt;landing pages are traffic intensive and would better use the same
query for everyone&lt;/li&gt;
&lt;li&gt;entity groups have to be designed to match the load and aim at low
write contention&lt;/li&gt;
&lt;li&gt;caching must be used aggressively (it is no surprise that
memcache was the first improvement that followed within a month of
the AppEngine public release)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusion&quot;&gt;
&lt;h3&gt;&lt;a&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As a conclusion, the interface AppEngine is exhibiting today requires
to optimize early, but I would bet that in the years to come, new
languages and domain-specific compilers or database engines will take
part of that burden off the hands of the developers.&lt;/p&gt;
&lt;p&gt;Did not Yahoo and Google start developping PigLatin and Sawzall to
make it easier to write parallel data-processing programs ? The same
could happen with describe a data-model in a high-level language and
get a tool to optimize it for write contention and web-scale
application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;see-also&quot;&gt;
&lt;h3&gt;&lt;a&gt;See Also&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;left&quot; alt=&quot;http://www.logilab.fr/images/lax.png&quot; class=&quot;align-left&quot; src=&quot;http://www.logilab.fr/images/lax.png&quot; /&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org&quot;&gt;LAX (Logilab App engine eXtension)&lt;/a&gt; is a full-featured web application framework running on Google AppEngine developed by Logilab.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-06-11T11:08-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5216</guid>
  <title>Google App Engine future directions</title>
  <link>http://www.logilab.org/blogentry/5216</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; class=&quot;align-right&quot; src=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; /&gt;
&lt;p&gt;Several of us went to San Francisco last week to attend Google IO. As usual with conferences, meeting people was more interesting than listening to most talks. The AppEngine Fireside Chat was a Q&amp;amp;A session that lasted about an hour. Here is what I learned from this session and various chats with AppEngineers.&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot;&gt;
&lt;li&gt;Google has decided to provide its &lt;strong&gt;scalable datastore&lt;/strong&gt; architecture &lt;strong&gt;as a service&lt;/strong&gt;. At this point, the datastore is the product and the goal it to make it as widely accessible as possible.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;google.appengine.api.datastore API&lt;/strong&gt; alone would &lt;strong&gt;not&lt;/strong&gt; have made for a very &lt;strong&gt;sexy&lt;/strong&gt; launch. In order to attract more people and lower the bar the beginners would have to jump over, they looked for a higher level programming interface.&lt;/li&gt;
&lt;li&gt;Since some people working at Google have been using &lt;strong&gt;Django&lt;/strong&gt; and know it, they reimplemented part of its interface for defining &lt;strong&gt;data models&lt;/strong&gt;. Late in the project, they added &lt;strong&gt;GQL&lt;/strong&gt; because Django-like queries were a bit too difficult. In both case, the goal was to make it easier for external developers &lt;strong&gt;to get started&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;But Google is not in the business of providing web application frameworks and AppEngineers made explicit that they would &lt;strong&gt;not be officially supporting a specific framework&lt;/strong&gt; or a specific version of a given framework (not even Django 0.96, although there is a django-appengine-helper project on code.google.com). They expect frameworks to be provided by communities of developers.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;My conclusion is twofold:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;They will be focusing on supporting other languages in AppEngine (I would bet on Java being the next one available) rather than extending Python frameworks support.&lt;/li&gt;
&lt;li&gt;Anyone is free to join with his own framework and provide support for it, the One True Interface being the one defined by google.appengine.api.datastore, not the one defined by db.model and GQL.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is why &lt;strong&gt;Logilab published its own framework running on App Engine&lt;/strong&gt; as free software and is providing support for it: &lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org&quot;&gt;Logilab Appengine eXtension&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2008-06-09T22:57-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5207</guid>
  <title>Nouvelle version de LAX - Logilab Appengine eXtension</title>
  <link>http://www.logilab.org/blogentry/5207</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; class=&quot;align-left&quot; src=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; /&gt;
&lt;p&gt;La version 0.3.0 de LAX est sortie aujourd&#39;hui voir : &lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org/&quot;&gt;http://lax.logilab.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Il suffit de 10 petites minutes pour avoir une application qui tourne, suivez le guide :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org/INSTALL&quot;&gt;http://lax.logilab.org/INSTALL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org/tutorial&quot;&gt;http://lax.logilab.org/tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mise à jour: LAX est maintenant inclus dans &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt;.&lt;/p&gt;
</description>
  <dc:date>2008-06-09T10:27-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5205</guid>
  <title>LAX - Logilab Appengine eXtension is a full-featured web application framework running on AppEngine</title>
  <link>http://www.logilab.org/blogentry/5205</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; class=&quot;align-left&quot; src=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; /&gt;
&lt;p&gt;LAX version 0.3.0 was released today, see &lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org/&quot;&gt;http://lax.logilab.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Get a new application running in ten minutes with the install guide
and the tutorial:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org/INSTALL.en.html&quot;&gt;http://lax.logilab.org/INSTALL.en.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org/tutorial.en.html&quot;&gt;http://lax.logilab.org/tutorial.en.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;Update: LAX is now included in the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; semantic web framework.&lt;/p&gt;
</description>
  <dc:date>2008-06-09T09:58-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5200</guid>
  <title>Browsers strangeness ...</title>
  <link>http://www.logilab.org/blogentry/5200</link>
  <description>&lt;p&gt;... or when inverting two lines of code in your HTML&#39;s HEAD can
speed up your web page rendering !&lt;/p&gt;
&lt;p&gt;If you have the following HTML page:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://yourdomain.com/css1.css&amp;quot; /&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
      var somearray = [1, 2, 3];
    &amp;lt;/script&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://yourdomain.com/css2.css&amp;quot; /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Hello&amp;lt;/h1&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Firefox3 [1] will download the CSS sequentially, hence if both CSS get 250ms to download,
this page will approximatively appear in more or less half a second.&lt;/p&gt;
&lt;p&gt;Now, if you just move the inline script before the two CSS declarations:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
      var somearray = [1, 2, 3];
    &amp;lt;/script&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://yourdomain.com/css1.css&amp;quot; /&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://yourdomain.com/css2.css&amp;quot; /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Hello&amp;lt;/h1&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;The two CSS files are now downloaded in parallel, and your page now take about
half time to render !&lt;/p&gt;
&lt;p&gt;One of the lessons here is that optimizing your website&#39;s backend is great and necessary,
but is a quite long term and hard job. On the other hand, optimizing the frontend
is often easier and pays off immediatly (well, so to speak...). Don&#39;t forget
that in complex and rich web sites, most of the time can be spent on
the client side.&lt;/p&gt;
&lt;p&gt;[1] It seems that Firefox 2 doesn&#39;t event try to download CSS in parallel.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;going-further&quot;&gt;
&lt;h3&gt;&lt;a&gt;Going further&lt;/a&gt;&lt;/h3&gt;
&lt;img align=&quot;right&quot; alt=&quot;http://developer.yahoo.com/yslow/help/images/OverallGrade_Size.png&quot; class=&quot;align-right&quot; src=&quot;http://developer.yahoo.com/yslow/help/images/OverallGrade_Size.png&quot; /&gt;
&lt;p&gt;Of course, this is quite browser-dependant ! It would be simpler if all browsers behaved the same way but
fortunately, there is a very nice tool named &lt;a class=&quot;reference&quot; href=&quot;http://stevesouders.com/cuzillion&quot;&gt;cuzillion&lt;/a&gt; developed by Steve Souders at
Google (formerly Chief performance at Yahoo and developer of &lt;a class=&quot;reference&quot; href=&quot;http://developer.yahoo.com/yslow/&quot;&gt;Yslow&lt;/a&gt;, a
&lt;a class=&quot;reference&quot; href=&quot;http://www.getfirebug.com/&quot;&gt;firebug&lt;/a&gt;&#39;s extension which is able to point out performance problems
of your site). This tool lets you create web pages online by inserting
inline scripts, CSS, images, etc. and then test how long the page takes
to be rendered in your browser. You can control the order of the inserted
elements as well as customize their properties (how long it shoud take
to download, choose another domain to download, if a script is defined
with a &lt;tt class=&quot;docutils literal&quot;&gt;script&lt;/tt&gt; tag, an XHR, an iframe, etc.)&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-06-07T18:21-01:00</dc:date>
  <dc:creator>Adrien Di Mascio</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5132</guid>
  <title>New apycot release</title>
  <link>http://www.logilab.org/blogentry/5132</link>
  <description>&lt;img align=&quot;left&quot; alt=&quot;http://www.logilab.org/image/4878?vid=download&amp;amp;small=true&quot; class=&quot;align-left&quot; src=&quot;http://www.logilab.org/image/4878?vid=download&amp;amp;small=true&quot; /&gt;
&lt;p&gt;After almost 2 years of inactivity, here is a new &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/apycot/0.11.0&quot;&gt;release&lt;/a&gt; of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/Project/name/apycot&quot;&gt;apycot&lt;/a&gt; the &amp;quot;Automated Pythonic Code Tester&amp;quot;. We use it everyday to maintain our software quality, and we hope this tool can help you  as well.&lt;/p&gt;
&lt;p&gt;Admittedly it&#39;s not trivial to setup, but once it&#39;s running you&#39;ll be able to count on it. We&#39;re working on getting it to work &amp;quot;out-of-the-box&amp;quot;...&lt;/p&gt;
&lt;p&gt;Here&#39;s what&#39;s in the ChangeLog :&lt;/p&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;2008-05-19  --  0.11.0&lt;/dt&gt;
&lt;dd&gt;&lt;ul class=&quot;first last simple&quot;&gt;
&lt;li&gt;updated documentation&lt;/li&gt;
&lt;li&gt;new pylintrc option for the pyhton_lint checker.&lt;/li&gt;
&lt;li&gt;Added code to disabled checker with missing required option with the
proper ERROR statut&lt;/li&gt;
&lt;li&gt;removed the catalog option of the xml_valid checker this feature can now
be handle with the XML_CATALOG_FILE environement variable (see libxml2
doc for details)&lt;/li&gt;
&lt;li&gt;moved xml tool from python-xml to lxml&lt;/li&gt;
&lt;li&gt;new &#39;hourly&#39; mode for running tests&lt;/li&gt;
&lt;li&gt;new &#39;test_activity_report&#39; report&lt;/li&gt;
&lt;li&gt;pylint checker support new disable_msg and show_categories options
(show_categories default to Error and Fatal categories to avoid
reports polution)&lt;/li&gt;
&lt;li&gt;activity option &amp;quot;days&amp;quot; has been renamed to &amp;quot;time&amp;quot; and correspond
to a number of day in daily mode but to a number of hour in hourly
mode&lt;/li&gt;
&lt;li&gt;fixed debian_lint and debian_piuparts to actually do something...&lt;/li&gt;
&lt;li&gt;fixed docutils checker for recent docutils versions&lt;/li&gt;
&lt;li&gt;dropped python 2.2/2.3 compat (to run apycot itself)&lt;/li&gt;
&lt;li&gt;added output redirectors to the debian preprocessor to avoid
parsing errors&lt;/li&gt;
&lt;li&gt;can use regular expressions in &amp;lt;pp&amp;gt;_match_* options&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
</description>
  <dc:date>2008-06-02T12:40-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5095</guid>
  <title>Flying to Google I/O</title>
  <link>http://www.logilab.org/blogentry/5095</link>
  <description>&lt;img alt=&quot;http://code.google.com/images/io_logo_sm.gif&quot; align=&quot;left&quot; src=&quot;http://code.google.com/images/io_logo_sm.gif&quot; style=&quot;padding: 0px 10px 0px 0px;&quot;/&gt;&lt;img alt=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; src=&quot;http://code.google.com/appengine/images/appengine_lowres.jpg&quot; align=&quot;right&quot;/&gt;&lt;p&gt;Three of us from Logilab are going to San Francisco to listen, share and discuss at Google I/O.&lt;/p&gt;
&lt;p&gt;It&#39;s a two day developer gathering in San Francisco, with various talks about google technologies : &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/events/io/&quot;&gt;http://code.google.com/events/io/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We&#39;re hoping to show and talk about LAX (&lt;a class=&quot;reference&quot; href=&quot;http://lax.logilab.org&quot;&gt;http://lax.logilab.org&lt;/a&gt;) which uses Google &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/appengine/&quot;&gt;AppEngine&lt;/a&gt;&lt;/p&gt;</description>
  <dc:date>2008-05-27T15:35-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5094</guid>
  <title>Présentation PyCON FR 2008 - Assurance qualité</title>
  <link>http://www.logilab.org/blogentry/5094</link>
  <description>&lt;img align=&quot;right&quot; alt=&quot;Photo sous licence creative commons `By-Nc-Nd`&quot; class=&quot;align-right&quot; src=&quot;http://yota.smugmug.com/photos/415225057_eEtQ3-M.jpg&quot; style=&quot;width: 300px; height: 200px;&quot; /&gt;
&lt;p&gt;Une présentation sur l&#39;assurance-qualité a été présentée le 17 mai 2008 pour les journées Python organisées par l&#39;Association Francophone Python (&lt;a class=&quot;reference&quot; href=&quot;http://www.afpy.org/&quot;&gt;AFPy&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Le but visé est de décrire quelques notions et pratiques simples pour améliorer la lisibilité et la maintenabilité de votre code python.&lt;/p&gt;
&lt;p&gt;Quelques outils standards de python sont décrits en première partie; pour finir par une revue de projets plus ambitieux mais indispensables pour la création de code de qualité.&lt;/p&gt;
&lt;p&gt;Photo sous licence creative commons &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/fr/&quot;&gt;By-Nc-Nd&lt;/a&gt; par : &lt;a class=&quot;reference&quot; href=&quot;http://yota.smugmug.com&quot;&gt;yota&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Pour accéder au diaporama :&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://fr.pycon.org/presentations_2008/julien-jehannet-assurance-qualite/slides.html&quot;&gt;http://fr.pycon.org/presentations_2008/julien-jehannet-assurance-qualite/slides.html&lt;/a&gt;&lt;/p&gt;
</description>
  <dc:date>2008-05-27T14:55-01:00</dc:date>
  <dc:creator>Julien Jehannet</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5091</guid>
  <title>Présentation de Gendb à PyconFR</title>
  <link>http://www.logilab.org/blogentry/5091</link>
  <description>&lt;p&gt;Ma présentation de 30 minutes est disponible à l&#39;adresse suivante :&lt;/p&gt;
&lt;blockquote&gt;
&lt;a class=&quot;reference&quot; href=&quot;http://fr.pycon.org/presentations_2008/andre-espaze-recherche-de-gene.pdf&quot;&gt;http://fr.pycon.org/presentations_2008/andre-espaze-recherche-de-gene.pdf&lt;/a&gt;&lt;/blockquote&gt;
&lt;img align=&quot;left&quot; alt=&quot;http://www.logilab.org/image/5136?vid=download&quot; class=&quot;align-left&quot; src=&quot;http://www.logilab.org/image/5136?vid=download&quot; /&gt;
&lt;p&gt;La journée s&#39;est bien passée, j&#39;ai eu quelques questions. Un chercheur
en génétique a demandé si le projet serait continué sur la recherche
des peptides (car ce sont les gènes qui codent les peptides d&#39;après
ce que j&#39;ai compris). J&#39;ai transféré cette demande à Eric Eveno,
je n&#39;ai pas de réponse pour l&#39;instant. Normalement, la vidéo devrait
être disponible sur :&lt;/p&gt;
&lt;blockquote&gt;
&lt;a class=&quot;reference&quot; href=&quot;http://fr.pycon.org/&quot;&gt;http://fr.pycon.org/&lt;/a&gt;&lt;/blockquote&gt;
&lt;p&gt;Vous pouvez me contactez si vous avez des questions : &lt;a class=&quot;reference&quot; href=&quot;mailto:andre.espaze&amp;#64;logilab.fr&quot;&gt;andre.espaze&amp;#64;logilab.fr&lt;/a&gt;&lt;/p&gt;
</description>
  <dc:date>2008-05-27T14:44-01:00</dc:date>
  <dc:creator>Andre Espaze</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5085</guid>
  <title>Testing for NaN without depending on Numpy</title>
  <link>http://www.logilab.org/blogentry/5085</link>
  <description>&lt;p&gt;How can I test if a python float is &amp;quot;not a number&amp;quot; without depending on numpy? Simple, a nan value is different to any other value, including itself:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
def isnan(x):
    return isinstance(x, float) and x!=x
&lt;/pre&gt;
</description>
  <dc:date>2008-05-27T11:23-01:00</dc:date>
  <dc:creator>Alexandre Fayolle</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5080</guid>
  <title>Profiter pleinement des CPUs avec Zope/Zeo/Debian</title>
  <link>http://www.logilab.org/blogentry/5080</link>
  <description>&lt;p&gt;Voici vite fait comment on profite du quad-core bi-proc multicoeurs avec zope/zeo/pound ... le tout en commandes debian.&lt;/p&gt;
&lt;p&gt;Inspiré de : &lt;a class=&quot;reference&quot; href=&quot;http://plone.org/documentation/how-to/simple-zope-clustering-with-squid-and-pound&quot;&gt;http://plone.org/documentation/how-to/simple-zope-clustering-with-squid-and-pound&lt;/a&gt;&lt;/p&gt;
&lt;img alt=&quot;http://plone.org/documentation/tutorial/introduction-to-the-zodb/zeo%20diagram.png&quot; src=&quot;http://plone.org/documentation/tutorial/introduction-to-the-zodb/zeo%20diagram.png&quot; /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;apt-get -uVf install plone-site pound&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle -z 2.10 make-zeoinstance sgel_zeo&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle -z 2.10 make-instance sgel2 --zeo-server=localhost:8100 -m all&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle -z 2.10 make-instance sgel3 --zeo-server=localhost:8100 -m all&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle -z 2.10 make-instance sgel1 --zeo-server=localhost:8100 -m all&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle -z 2.10 make-instance sgel4 --zeo-server=localhost:8100 -m all&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;modifiez les ports de chaque instance (par exemple 9673, 9674, 9675, 9676)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;vim ~/zope/instances/sgel*/etc/zope.conf&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle add-product sgel1 CMFPlone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle add-product sgel2 CMFPlone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle add-product sgel3 CMFPlone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle add-product sgel4 CMFPlone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle zeoctl sgel_zeo start&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle zopectl sgel1 start&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle zopectl sgel2 start&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle zopectl sgel3 start&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;dzhandle zopectl sgel4 start&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;vim /etc/pound/pound.cfg pour remplacer&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
BackEnd
        Address 127.0.0.1
        Port    8080
End
&lt;/pre&gt;
&lt;p&gt;par&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Service
        BackEnd
                Address 127.0.0.1
                Port    9673
        End
        BackEnd
                Address 127.0.0.1
                Port    9674
        End
        BackEnd
                Address 127.0.0.1
                Port    9675
        End
        BackEnd
                Address 127.0.0.1
                Port    9676
        End
End
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;/etc/init.d/pound restart&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;tapez sur &lt;a class=&quot;reference&quot; href=&quot;http://localhost:8080&quot;&gt;http://localhost:8080&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;ajoutez un site plone&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;pour tester, lancez htop pour voir l&#39;activité et regardez la différence entre :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;apt-get -uVf install apache2-utils&lt;/li&gt;
&lt;li&gt;/usr/sbin/ab -n 100 -c 100 localhost:8080/plone&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;et&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;/usr/sbin/ab -n 100 -c 100 localhost:9673/plone&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;nice!&lt;/p&gt;
</description>
  <dc:date>2008-05-27T09:52-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5078</guid>
  <title>Reinteract: un outil intéressant pour faire du numpy/scipy</title>
  <link>http://www.logilab.org/blogentry/5078</link>
  <description>&lt;p&gt;Il existe un outil, &lt;a class=&quot;reference&quot; href=&quot;http://fishsoup.net/software/reinteract&quot;&gt;Reinteract&lt;/a&gt;, qui permet d&#39;avoir une sorte de d&#39;éditeur/shell Python, où l&#39;on peut aisément modifier et réinterpreter une ligne de code.&lt;/p&gt;
&lt;p&gt;Sachant qu&#39;il sait aussi afficher des plots, etc, il est possible de s&#39;en servir avantageusement pour faire des sessions Matlab-like.&lt;/p&gt;
&lt;p&gt;Je pense donc que c&#39;est un outil à présenter à nos chers apprenants qui sont intéressés par le couple python/numpy comme substitut à Matlab ©®.&lt;/p&gt;
&lt;p&gt;Ex:&lt;/p&gt;
&lt;img alt=&quot;http://fishsoup.net/software/reinteract/reinteract-demo.png&quot; src=&quot;http://fishsoup.net/software/reinteract/reinteract-demo.png&quot; /&gt;
&lt;p&gt;&lt;strong&gt;écrit par David Douard&lt;/strong&gt;&lt;/p&gt;
</description>
  <dc:date>2008-05-27T09:48-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5076</guid>
  <title>Petit raccourci pratique avec ion3</title>
  <link>http://www.logilab.org/blogentry/5076</link>
  <description>&lt;p&gt;Un petit raccourci pratique pour ion3, qui permet, sur la combinaison de touches de son choix, de prendre le texte actuellement sélectionné (surligné) dans sa session X11, et, en fonction de son contenu :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;d&#39;ouvrir un onglet Firefox avec l&#39;url sélectionnée,&lt;/li&gt;
&lt;li&gt;d&#39;ouvrir un xpdf si c&#39;est une URL de fichier PDF,&lt;/li&gt;
&lt;li&gt;lancer OpenOffice.org si c&#39;est un fichier OOo,&lt;/li&gt;
&lt;li&gt;ouvrir le fichier dans emacs si c&#39;est un &lt;cite&gt;.py&lt;/cite&gt;, &lt;cite&gt;.po&lt;/cite&gt;, etc.&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pour cela, il faut le script magique ci-dessous, et configurer ion pour appeler ce script sur la bonne combinaison  de touches. Par ex. ajouter dans votre  &lt;cite&gt;~/.ion3/cfg_ion.lua&lt;/cite&gt; les lignes&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
defbindings(&amp;quot;WMPlex.toplevel&amp;quot;, {
  bdoc(&amp;quot;Automagically view the selected string&amp;quot;),
  kpress(META..&amp;quot;F7&amp;quot;,
         &amp;quot;ioncore.exec_on(_, &#39;/home/user/bin/view&#39;)&amp;quot;),
})
&lt;/pre&gt;
&lt;p&gt;Ici, j&#39;ai mappé &amp;quot;Meta+F7&amp;quot;, et le script est &lt;cite&gt;/home/user/bin/view&lt;/cite&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/env python&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;mimetypes&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;guess_type&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os.path&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;abspath&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;popen&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;re&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;compile&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;emacsclient --no-wait &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;EMACS_WITH_LINE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;emacsclient --no-wait +&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(lineno)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;FIREFOX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;firefox -remote &amp;quot;openURL(&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;, new-tab)&amp;quot;&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;WGET&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;cd /home/adim/tmp &amp;amp;&amp;amp; wget &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp; &amp;#39;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;commands&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;text/html&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FIREFOX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;application/xml&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;text&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;image&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;display &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;application/pdf&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;xpdf &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;application/postcript&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;gv &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;application/vnd.sun.xml&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;ooffice &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# matches writer, impress, etc.&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;application/vnd.oasis.opendocument&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;ooffice &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;application/msword&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;ooffice &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;application/vnd.ms-&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;ooffice &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(uri)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &amp;amp;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;patterns&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r&amp;#39;https?://.*?(zip|gz|pdf|ods|doc|odt|ppt|sxw|sxi)$&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;WGET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r&amp;#39;.*(?P&amp;lt;uri&amp;gt;https?://[^ ()]*)( .*)?&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FIREFOX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;.*?\.conf$&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;.*?\.po$&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;.*?\.xslt$&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;.*?\.pot$&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r&amp;#39;\s*F?i?l?e? ?&amp;quot;?(?P&amp;lt;uri&amp;gt;.*?\.py)&amp;quot;, line (?P&amp;lt;lineno&amp;gt;\d+)[a-zA-Z_:-]*&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS_WITH_LINE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RGX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;.*?(readme|changelog|depends|manifest|makefile)(\.in|\.gz|\.bz2)?$&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EMACS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# others might come here ...&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;find_command&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;selection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rgx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;patterns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rgx&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;selection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;groupdict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;uri&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;mimetype&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;encoding&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;guess_type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;selection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# XXX: encodings like zip, or gz could be handled&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mimetype&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;selection&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;abspath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;selection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;registered_type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;commands&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mimetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;startswith&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;registered_type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;uri&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;ValueError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;nothing matched&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:])&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;popen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;xclip -o&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;find_command&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;selected&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;ValueError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# system(&amp;#39;wmiijabber error viewing %s&amp;#39; % &amp;#39; &amp;#39;.join(sys.argv[1:]))&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# XXX print a message in wmii status bar ?&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;pass&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;#print &amp;quot;yooo =&amp;gt;&amp;quot;, repr(cmd), repr(args)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Pour que cela fonctionne, il ne faut pas oublier d&#39;installer &lt;cite&gt;xclip&lt;/cite&gt; (sous debian, &lt;cite&gt;apt-get install xclip&lt;/cite&gt;).&lt;/p&gt;
&lt;p&gt;-- écrit par David Douard sur un script de Adrien diMascio&lt;/p&gt;
</description>
  <dc:date>2008-05-27T09:45-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5070</guid>
  <title>Petites astuces de vim</title>
  <link>http://www.logilab.org/blogentry/5070</link>
  <description>&lt;p&gt;J&#39;ai découvert vim-addons (qui est apparu dans debian récement) et ce petit outil permet de faire d&#39;etendre les fonctionnalités de vim assez facilement. Voici une utilisation parmi tant d&#39;autres :&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;mode-gnupg&quot;&gt;
&lt;h3&gt;&lt;a&gt;mode gnupg&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;pour installer le mode gnupg faites&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
vim-addons install gnupg
&lt;/pre&gt;
&lt;p&gt;Ensuite vim pourra ouvrir directement des fichiers encryptés et les réncrypter lorsque vous sauvez. Donc simplement&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
vim mot-de-passe-envoyé-par-client.gpg
&lt;/pre&gt;
&lt;p&gt;Voilà, le tour est joué.&lt;/p&gt;
&lt;p&gt;J&#39;avoue que je reste avec emacs pour le code, mais ce genre de petit raccourcis est bien pratique.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2008-05-27T09:37-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5034</guid>
  <title>LAX - Logilab Google AppEngin Sprint at Pycon-FR</title>
  <link>http://www.logilab.org/blogentry/5034</link>
  <description>&lt;p&gt;Here are a few pictures from the &lt;a href=&quot;http://fr.pycon.org/programme/sprint-appengine&quot;&gt;sprint&lt;/a&gt; we organized at &lt;a href=&quot;http://fr.pycon.org/&quot;&gt;Pycon-FR&lt;/a&gt;&lt;/p&gt;&amp;#13;
&lt;p&gt; &lt;/p&gt;&amp;#13;
&lt;p&gt;We got a few people to install &lt;a href=&quot;http://code.google.com/appengine/&quot;&gt;Google AppEngine&lt;/a&gt; and &lt;a href=&quot;http://lax.logilab.org&quot;&gt;LAX&lt;/a&gt; on their machines, and explained the concepts at hand to a bunch of other people.&lt;/p&gt;&amp;#13;
&lt;center&gt;&amp;#13;
&lt;img alt=&quot;http://www.logilab.org/image/5002?vid=download&quot; src=&quot;https://www.logilab.net/elo/image/5002?vid=download&quot;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;img alt=&quot;http://www.logilab.org/image/5003?vid=download&quot; src=&quot;https://www.logilab.net/elo/image/5003?vid=download&quot;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;img alt=&quot;http://www.logilab.org/image/5005?vid=download&quot; src=&quot;https://www.logilab.net/elo/image/5005?vid=download&quot;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/center&gt;&amp;#13;
&amp;#13;
&amp;#13;
&lt;p&gt;Update: LAX is now included in the &lt;a href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; semantic web framework.&lt;/p&gt;</description>
  <dc:date>2008-05-20T10:31-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/5026</guid>
  <title>HOWTO quickly get lax running on linux</title>
  <link>http://www.logilab.org/blogentry/5026</link>
  <description>&lt;p&gt;This is how easy it is to get lax to run on your linux machine :&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;hg clone http://www.logilab.org/hg/lax/
wget http://googleappengine.googlecode.com/files/google_appengine_1.0.2.zip
unzip google_appengine_1.0.2.zip
./google_appengine/dev_appserver.py lax/skel/
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Point your favorite browser to &lt;a class=&quot;reference&quot; href=&quot;http://localhost:8080/&quot;&gt;http://localhost:8080/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;UPDATE: LAX is now included in the &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt; semantic web framework.&lt;/p&gt;
</description>
  <dc:date>2008-05-19T13:45-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/3476</guid>
  <title>Another step towards the semantic web</title>
  <link>http://www.logilab.org/blogentry/3476</link>
  <description>&lt;p&gt;I co-organized the Web2.0 conference track that was held at &lt;span class=&quot;vevent&quot;&gt;
    &lt;a class=&quot;url&quot; href=&quot;http://www.solutionslinux.fr/&quot;&gt;
     &lt;span class=&quot;summary&quot;&gt;Solutions Linux 2007&lt;/span&gt;
     in &lt;span class=&quot;location&quot;&gt;Paris&lt;/span&gt;
     &lt;span class=&quot;dtstart&quot; title=&quot;2007-01-30T09:00:00Z&quot;&gt;last&lt;/span&gt;
     &lt;span class=&quot;dtend&quot; title=&quot;2007-02-01T18:00:00Z&quot;&gt;week&lt;/span&gt;
    &lt;/a&gt;
  &lt;/span&gt;. Researching to prepare the talk I gave, I came accross &lt;a href=&quot;http://www.microformats.org/&quot;&gt;microformats&lt;/a&gt; and &lt;a href=&quot;http://www.w3.org/2001/sw/grddl-wg/&quot;&gt;GRDDL&lt;/a&gt;. Both try to add semantics on top of (X)HTML.
&lt;/p&gt;

Microformats uses the class attribute and the &quot;invisibility&quot; of `div` and `span` to insert semantic information, as in ::

&lt;pre&gt;
  &amp;lt;li class=&quot;vevent&quot;&amp;gt;
    &amp;lt;a class=&quot;url&quot; href=&quot;http://www.solutionslinux.fr/&quot;&amp;gt;
     &amp;lt;span class=&quot;summary&quot;&amp;gt;Solutions Linux Web 2.0 Conference&amp;lt;/span&amp;gt;: 
     &amp;lt;abbr class=&quot;dtstart&quot; title=&quot;20070201T143000Z&quot;&amp;gt;February 1st 2:30pm&amp;lt;/abbr&amp;gt;-
     &amp;lt;abbr class=&quot;dtend&quot; title=&quot;20070201T18000Z&quot;&amp;gt;6pm&amp;lt;/abbr&amp;gt;, at the 
     &amp;lt;span class=&quot;location&quot;&amp;gt;CNIT, La Défense&amp;lt;/span&amp;gt;
    &amp;lt;/a&amp;gt;
  &amp;lt;/li&amp;gt;
&lt;/pre&gt;

&lt;p&gt;GRDDL information is added to the `head` of the XHTML page and points to an XSL that can extract the information from the page and output it as RDF.&lt;/p&gt;

&lt;p&gt;Another option is to add `link` to the `head` of the page, pointing to an alternate representations like a RDF formatted one.&lt;/p&gt;

&lt;p&gt;Firefox has add-ons that help you spot semantic enabled web pages: &lt;a href=&quot;http://blog.codeeg.com/tails-firefox-extension-03/&quot;&gt;Tails&lt;/a&gt; detects microformats and the &lt;a href=&quot;http://sioc-project.org/firefox&quot;&gt;semantic radar&lt;/a&gt; detects RDF. &lt;a href=&quot;https://addons.mozilla.org/firefox/4106/&amp;#10;&quot;&gt;Operator&lt;/a&gt; is an option I found too invasive.&lt;/p&gt;

&lt;p&gt;As for my talk, it involved demonstrating &lt;a href=&quot;http://www.cubicweb.org/&quot;&gt;CubicWeb&lt;/a&gt;, the engine behind logilab.org, and querying the data stored at logilab.org to reuse it with &lt;a href=&quot;http://simile.mit.edu/exhibit&quot;&gt;Exhibit&lt;/a&gt;.&lt;/p&gt;</description>
  <dc:date>2007-02-06T17:24-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/3257</guid>
  <title>Install Python Cartographic Library</title>
  <link>http://www.logilab.org/blogentry/3257</link>
  <description>&lt;p&gt;This is how we setup PCL &amp;lt;&lt;a class=&quot;reference&quot; href=&quot;http://trac.gispython.org/projects/PCL&quot;&gt;http://trac.gispython.org/projects/PCL&lt;/a&gt;&amp;gt; under debian. Of course having a package would be better...&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Install dependencies&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
apt-get install mapserver-bin python-mapscript mapserver-cgi
gdal-bin python-gdal python-dev libgeos-dev libgdal-dev
libgd2-xpm-dev python-setuptools zope-interface
python-elementtree
&lt;/pre&gt;
&lt;p&gt;Now link libgdal.a to libgdal1.3.2.a&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Install PCL from sources&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
svn co  http://svn.gispython.org/svn/gispy/PCL/trunk

cd PCL/

cd externals/OWSLib
python setup.py install --prefix=my_python_library

cd externals/QuadTree
python setup.py install --prefix=my_python_library

cd PCL-Core
python setup.py install --prefix=my_python_library

cd PCL-GDAL
python setup.py install --prefix=my_python_library

cd PCL-MapServer
&lt;/pre&gt;
&lt;p&gt;Put in a directory the source code of mapserver corresponding to the package version installed above. Get it from &lt;a class=&quot;reference&quot; href=&quot;http://mapserver.gis.umn.edu/download&quot;&gt;http://mapserver.gis.umn.edu/download&lt;/a&gt; or with dpkg-src.&lt;/p&gt;
&lt;p&gt;Edit setup.py to set ms_home to the path of the above mapserver sources.&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
python setup.py install --prefix=my_python_library
&lt;/pre&gt;
&lt;p&gt;my_python_library now contains Python eggs and directories with Python and C libraries.&lt;/p&gt;
</description>
  <dc:date>2006-12-07T16:31-01:00</dc:date>
  <dc:creator>Nicolas Chauvat</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/2609</guid>
  <title>New Logilab.org is launched</title>
  <link>http://www.logilab.org/blogentry/2609</link>
  <description>&lt;p&gt;** Insert announce text here **&lt;/p&gt;
</description>
  <dc:date>2006-10-24T12:15-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/2487</guid>
  <title>CMFProjman is being ported to Plone2</title>
  <link>http://www.logilab.org/blogentry/2487</link>
  <description>&lt;p&gt;CMFProjman has been asleep for quite a while, and is now being reanimated to work with Plone2. We will release it as soon as we see it&#39;s stable.&lt;/p&gt;
</description>
  <dc:date>2006-10-18T16:44-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
  </channel>
</rss>