<?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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry</link>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/38529</guid>
  <title>MiniDebConf Paris 2010</title>
  <link>http://www.logilab.org/blogentry/38529</link>
  <description>&lt;img alt=&quot;http://france.debian.net/debian-france.png&quot; class=&quot;align-left&quot; src=&quot;http://france.debian.net/debian-france.png&quot; /&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://france.debian.net/&quot;&gt;Debian France&lt;/a&gt; organise le 30 et 31 octobre prochain une &lt;a class=&quot;reference&quot; href=&quot;http://fr2010.mini.debconf.org/&quot;&gt;minidebconf&lt;/a&gt; à Paris. Le &lt;a class=&quot;reference&quot; href=&quot;http://wiki.debconf.org/wiki/Miniconf-Paris/2010&quot;&gt;wiki de la conférence&lt;/a&gt; est en train de s&#39;étoffer, et pour le moment c&#39;est là qu&#39;il faut s&#39;inscrire. À Logilab nous sommes utilisateurs et contributeurs de Debian, c&#39;est donc naturellement que nous allons essayer d&#39;aller participer à cette conférence. &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/afayolle&quot;&gt;Alexandre Fayolle&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://qa.debian.org/developer.php?login=afayolle&amp;#64;debian.org&quot;&gt;développeur Debian&lt;/a&gt; ira assister (entre autres) à la présentation de &lt;a class=&quot;reference&quot; href=&quot;http://carlchenet.wordpress.com/&quot;&gt;Carl Chenet&lt;/a&gt; sur l&#39;état de Python dans Debian.&lt;/p&gt;
</description>
  <dc:date>2010-09-09T11:33-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<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 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;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;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 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 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 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 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 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 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 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 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 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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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%20ORDERBY%20D%20DESC%20LIMIT%2015%20WHERE%20X%20creation_date%20D%2C%20X%20is%20BlogEntry&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>
  </channel>
</rss>