<?xml version="1.0" ?>
<?xml-stylesheet href="" type="text/css"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:dcterms="http://purl.org/dc/terms/"
         xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
         xmlns:rss="http://purl.org/rss/1.0/"
         xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <rss:channel rdf:about="http://www.jfroche.be/blogging">

        <rss:title>Weblog</rss:title>
        <rss:link>http://www.jfroche.be/blogging</rss:link>

        <rss:description>tail /dev/mind &gt; blog</rss:description>
        

        <rss:image rdf:resource="http://www.jfroche.be/logo.png"/>

        <sy:updatePeriod>daily</sy:updatePeriod>
        <sy:updateFrequency>1</sy:updateFrequency>

        <rss:items>
            <rdf:Seq>
                
                <rdf:li rdf:resource="http://www.jfroche.be/blogging/archive/2008/01/08/writing-openoffice-documents-from-zope"/>
                
                
                <rdf:li rdf:resource="http://www.jfroche.be/blogging/archive/2007/12/10/avoid-fetching-zope-3-libraries-in-buildout"/>
                
                
                <rdf:li rdf:resource="http://www.jfroche.be/blogging/archive/2007/12/06/buildout-and-virtualenv"/>
                
                
                <rdf:li rdf:resource="http://www.jfroche.be/blogging/archive/2007/04/28/write-nicer-python-code"/>
                
                
                <rdf:li rdf:resource="http://www.jfroche.be/blogging/archive/2006/10/24/watch-my-new-commit"/>
                
                
                <rdf:li rdf:resource="http://www.jfroche.be/blogging/archive/2006/04/05/blogging"/>
                
            </rdf:Seq>
        </rss:items>
    </rss:channel>

    <rss:image rdf:about="http://www.jfroche.be/logo.png">
        <rss:title>Weblog</rss:title>
        <rss:link>http://www.jfroche.be/blogging</rss:link>
        <rss:url>http://www.jfroche.be/logo.png</rss:url>
    </rss:image>

    

    <rss:item rdf:about="http://www.jfroche.be/blogging/archive/2008/01/08/writing-openoffice-documents-from-zope">

        <rss:title>OpenOffice with buildouts</rss:title>

        <rss:link>http://www.jfroche.be/blogging/archive/2008/01/08/writing-openoffice-documents-from-zope</rss:link>       

        <rss:description>Easy install the pyuno library with buildout</rss:description>

        <content:encoded>
          <![CDATA[
          
<p>This recipe was started by <a href="http://www.infrae.com/">Infrae</a>, I have added the pyuno egg creation within the recipe. It is so nice to be able to share code so easily !<br /></p>
<p>Download <a href="http://www.openoffice.org">OpenOffice</a> in a buildout might sound odd but <br /></p>
<ul><li>You got used (and I think you are right) to isolate your python environment for each projects (e.g using buildout &amp; virtualenv)</li><li>You want to control OpenOffice components with your favourite python using the official OpenOffice library: pyuno<br /></li><li>If you already installed OpenOffice, you might not see how to link your favourite python with the pyuno library provided by the OpenOffice package of your favourite distribution</li></ul>
<br />
The <a href="http://udk.openoffice.org/python/python-bridge.html">python uno library</a> (aka pyuno) is only delivered with OpenOffice. The library provides access to all OpenOffice UNO api which means:<br />
<ul><li>read and write doc, odt, rdf, xls and the most common file extension known in the different well known office suites<br /></li><li>generate nice pdf</li><li>no xml parsing/transforms when you want to read odt &amp; co<br /></li><li>fill in templates with content (e.g. <a href="http://appyframework.org/pod.html">pod </a>)<br /></li><li>drawing shapes</li><li>... (you might want to have a look at <a href="http://api.openoffice.org/docs/DevelopersGuide/DevelopersGuide.xhtml">the OO developper guide</a> for more informations even if there is lot's of java examples )</li></ul>
<br />The only major disadvantage is that it requires to connect to an openoffice process. This can be a problem if your sysadmin don't want to  install a real X server in a production environment but this disadvantage is quickly fixed if you install and use <a href="http://en.wikipedia.org/wiki/Xvfb">Xvfb</a> <br /><br />This recipe can<br />
<ul><li>download OpenOffice from any url (default to OpenOffice 2.3) and extract it in your buildout<br /></li><li>replace the default python interpreter delivered with OO with the one you are using in your buildout</li><li>create an egg with pyuno and link it inside your buildout</li></ul>
<br />More info about installation and usage of this recipe <a href="http://pypi.python.org/pypi/z3c.recipe.openoffice/0.2">on pypi</a><br /><br />Linux is only supported by now (and I don't want to be sorry for not having a mac), if you want to fix this the code is <a href="http://svn.zope.org/z3c.recipe.openoffice/trunk">here</a> ;)
          ]]>
        </content:encoded>        

        <dc:date>2008-01-08T23:13:24+01:00</dc:date>

        <dcterms:modified>2008-01-08T23:13:24+01:00</dcterms:modified>

        <dc:creator>jfroche</dc:creator>

        

        
            <dc:subject>Work</dc:subject>
        
        
            <dc:subject>plone</dc:subject>
        
        
            <dc:subject>zope-3</dc:subject>
        

    </rss:item>

    
    

    <rss:item rdf:about="http://www.jfroche.be/blogging/archive/2007/12/10/avoid-fetching-zope-3-libraries-in-buildout">

        <rss:title>Zope 3 dependencies in Zope 2 buildout</rss:title>

        <rss:link>http://www.jfroche.be/blogging/archive/2007/12/10/avoid-fetching-zope-3-libraries-in-buildout</rss:link>       

        <rss:description>Describe a buildout recipe to avoid fetching zope 3 libraries when installing eggs with zope 3 depedencies in a zope 2 buildout</rss:description>

        <content:encoded>
          <![CDATA[
          
<p>I got tired removing zope.interface, zope.component, zope.deferredimport, zope.event, ... of my eggs folder inside my buildout when installing package such as z3c.sqlalchemy in my Zope2 / Plone buildouts ... <br /><br />After the <a href="http://www.nabble.com/buildout-and-egg-depedencies-to14192774.html">discussion on Zope3-users list</a> and thanks to Jim lights, I wrote a really <a href="http://pypi.python.org/pypi/affinitic.recipe.fakezope2eggs/0.1">simple recipe</a> which just create egg links to zope libraries in your develop-eggs so that setuptools can see that the dependencies are
already satisfied.</p>
<p>So if you list your zope library :</p>
<pre>
<p>$ ls yourbuildout/parts/yourzope2/lib/python/zope<br /><br />app               configuration    documenttemplate  exceptions  i18n           __init__.py  pagetemplate  schema    structuredtext  testbrowser  viewlet<br />cachedescriptors  contentprovider  dottedname        formlib     i18nmessageid  interface    proxy         security  tal             testing<br />component         deprecation      event             hookable    index          modulealias  publisher     server    tales           thread</p>
</pre>
<p>You will get <br /></p>
<pre>
<p>$ ls yourbuildout/develop-eggs</p>
<p>zope.app.component.egg-info     zope.app.security.egg-info      zope.dottedname.egg-info     zope.interface.egg-info     zope.structuredtext.egg-info<br />zope.app.egg-info               zope.app.testing.egg-info       zope.event.egg-info          zope.modulealias.egg-info   zope.tal.egg-info<br />zope.app.event.egg-info         zope.cachedescriptors.egg-info  zope.exceptions.egg-info     zope.pagetemplate.egg-info  zope.tales.egg-info<br />zope.app.i18n.egg-info          zope.component.egg-info         zope.formlib.egg-info        zope.proxy.egg-info         zope.testbrowser.egg-info<br />zope.app.interface.egg-info     zope.configuration.egg-info     zope.hookable.egg-info       zope.publisher.egg-info     zope.testing.egg-info<br />zope.app.pagetemplate.egg-info  zope.contentprovider.egg-info   zope.i18n.egg-info           zope.schema.egg-info        zope.thread.egg-info<br />zope.app.publisher.egg-info     zope.deprecation.egg-info       zope.i18nmessageid.egg-info  zope.security.egg-info      zope.viewlet.egg-info<br />zope.app.schema.egg-info        zope.documenttemplate.egg-info  zope.index.egg-info          zope.server.egg-info<br /></p>
</pre>
<p>Where each of these file will be seen for setuptools as an egg:<br /></p>
<pre>$ cat yourbuildout/develop-eggs/zope.app.component.egg-info<br /><br />Metadata-Version: 1.0<br />Name: zope.app.component<br />Version: 0.0<br /></pre>
<p>Sure this might look like an ugly hook but I can't wait for zope 2 eggification<br /></p>

          ]]>
        </content:encoded>        

        <dc:date>2007-12-10T18:23:37+01:00</dc:date>

        <dcterms:modified>2007-12-10T18:23:37+01:00</dcterms:modified>

        <dc:creator>jfroche</dc:creator>

        

        
            <dc:subject>plone</dc:subject>
        
        
            <dc:subject>zope-3</dc:subject>
        

    </rss:item>

    
    

    <rss:item rdf:about="http://www.jfroche.be/blogging/archive/2007/12/06/buildout-and-virtualenv">

        <rss:title>Buildout and Virtualenv</rss:title>

        <rss:link>http://www.jfroche.be/blogging/archive/2007/12/06/buildout-and-virtualenv</rss:link>       

        <rss:description>How and why use buildout with virtualenv</rss:description>

        <content:encoded>
          <![CDATA[
          
<p><a href="http://pypi.python.org/pypi/zc.buildout">Buildout</a> is this wonderful tool which helps you to automate setup and configuration of your applications.<br /></p>
<p><a href="http://pypi.python.org/pypi/virtualenv">Virtualenv</a> is a tool which will help you to isolate your python environment</p>
A few days ago I got stuck during a long time because I didn't see that one library I installed in my global site-packages of my favourite python 2.4  (on my ubuntu: /usr/lib/python2.4/site-packages/) was a lower version of a library I was using in my buildout. Package was <a href="http://www.sqlalchemy.org">sqlalchemy</a> 0.4 in my global sites-package and my buildout based application was using <a href="http://www.sqlalchemy.org">sqlalchemy</a> 0.3.8 ... Here is a simple solution to avoid this kind of things. <br /><br />Idea is to start buildout with a python free of any external library. <a href="http://pypi.python.org/pypi/virtualenv">Virtualenv</a> is the answer.<br />
<p></p>
<br />
<h3>Install Virtualenv</h3>
Easy:<br /><br />
<pre><b>$ easy_install virtualenv</b></pre>
<br />you will have then a file that you can run: <b>/usr/bin/virtualenv<br /><br /></b>Let's say you have a buildout configuration go into it:<br /><br />
<pre><b>$ cd myApp.buildout<br />$ ls -l<br />bootstrap.py<br />buildout.cfg</b><b><br /></b></pre>
Now you just have to create the python environment without any access to the global site-packages with virtualenv:<b><br />
<pre>$ virtualenv --no-site-packages .<br /></pre>
</b>You will have then your new python in the bin folder :<br />
<pre><b>$ ls -l bin<br />activate<br />easy_install<br />easy_install-2.4<br />python2.4</b><br /></pre>
You can now run the buildout configuration with your new python:<br /><b>
<pre>$ ./bin/python2.4 bootstrap.py<br />$ ./bin/buildout<br /></pre>
</b>This will create you a nice and totally isolated environment ...<br /><b> <br /></b>
          ]]>
        </content:encoded>        

        <dc:date>2007-12-06T18:38:16+01:00</dc:date>

        <dcterms:modified>2007-12-08T13:56:53+01:00</dcterms:modified>

        <dc:creator>jfroche</dc:creator>

        

        
            <dc:subject>plone</dc:subject>
        
        
            <dc:subject>zope-3</dc:subject>
        

    </rss:item>

    
    

    <rss:item rdf:about="http://www.jfroche.be/blogging/archive/2007/04/28/write-nicer-python-code">

        <rss:title>Write nicer Python code</rss:title>

        <rss:link>http://www.jfroche.be/blogging/archive/2007/04/28/write-nicer-python-code</rss:link>       

        

        <content:encoded>
          <![CDATA[
          <p>Starting from the basic facts:</p><ul><li>you can't always code in pair</li><li>you don't want to compile &amp; tests to check that is fine in the last few line you have just written</li><li>you want to write nice python code</li><li>you want to improve the way you write python<br /><br /></li></ul><p>It exists a few very interesting softwares that can help you.<br /><br />Here is a list of the one I am using really often:<br /><br />PyFlakes - <a href="http://www.divmod.org/projects/pyflakes" target="_self">http://www.divmod.org/projects/pyflakes</a><br /><br />PyLint - <a href="http://www.logilab.org/view?rql=Any%20X%20WHERE%20X%20eid%20857" target="_self">http://www.logilab.org/view?rql=Any%20X%20WHERE%20X%20eid%20857</a><br /><br />These two are nice also but not as good as the previous one:<br /><br />PyMetrics - <a href="http://sourceforge.net/projects/pymetrics" target="_self">http://sourceforge.net/projects/pymetrics<br /></a><br />PyChecker - <a href="http://pychecker.sourceforge.net/" target="_self">http://pychecker.sourceforge.net/</a><br />  <br />These tool are directly linked to my favourite editor VI: <br /><br /></p><pre>command Pyflakes :call Pyflakes()<br />function! Pyflakes()<br />    let tmpfile = tempname()<br />    execute "w" tmpfile<br />    execute "set makeprg=(pyflakes\\ " . tmpfile . "\\\\\\|sed\\ s@" . tmpfile ."@%@)"<br />    make<br />    cw<br />endfunction</pre><p><br /></p><pre>command Pylint :call Pylint()<br />function! Pylint()<br />    setlocal makeprg=(echo\ '[%]';\ pylint\ %)<br />    setlocal efm=%+P[%f],%t:\ %#%l:%m<br />    silent make<br />    cwindow<br />    endfunction</pre><p><br />And better each time you save your python file in vim , I check for wrong imports with Pyflakes with:<br /><br /></p><pre>autocmd BufWrite *.{py} :call Pyflakes()</pre><p><br /></p>
          ]]>
        </content:encoded>        

        <dc:date>2007-04-28T14:09:49+02:00</dc:date>

        <dcterms:modified>2007-04-28T14:09:49+02:00</dcterms:modified>

        <dc:creator>jfroche</dc:creator>

        

        
            <dc:subject>general</dc:subject>
        
        
            <dc:subject>plone</dc:subject>
        
        
            <dc:subject>zope-3</dc:subject>
        

    </rss:item>

    
    

    <rss:item rdf:about="http://www.jfroche.be/blogging/archive/2006/10/24/watch-my-new-commit">

        <rss:title>Watch my new commit...</rss:title>

        <rss:link>http://www.jfroche.be/blogging/archive/2006/10/24/watch-my-new-commit</rss:link>       

        <rss:description>Get notification as soon as somebody commit is really important! A quick note to set it up with emails...</rss:description>

        <content:encoded>
          <![CDATA[
          <p>We will make this in 4 steps.<br /><br /> </p><h3 class="Subheading"><b>Step 1: Installing pysvn</b></h3>Check that you don't have it yet:<br /><pre>$ python2.4<br />Python 2.4.3 (#2, Oct  6 2006, 07:52:30)<br />[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2<br />Type "help", "copyright", "credits" or "license" for more information.<br />&gt;&gt;&gt; import svn<br />&gt;&gt;&gt;</pre>If you get something else (e.g ImportError: No module named svn) you will need to do this step:<br /><br />You will need the python library to access subversion: <b>pysvn. </b>Note that header of the libsvn are required [should come with your subversion install]!<b><br /></b>Go to  <a href="http://pysvn.tigris.org/project_downloads.html" target="_self">http://pysvn.tigris.org/project_downloads.html</a> and fetch last tarball (MacOSX version also available). Note that<br />pysvn is noted there as "Extension". I fetched last stable version: <a href="http://pysvn.tigris.org/files/documents/1233/34994/pysvn-1.5.0.tar.gz" target="_self">http://pysvn.tigris.org/files/documents/1233/34994/pysvn-1.5.0.tar.gz</a><br /><br /><pre>$ tar xvzf pysvn-1.5.0.tar.gz <br /> ...<br />$ cd pysvn-1.5.0/Source<br />$ python2.4 setup.py configure <br />...<br />$ make<br />...[pray]...<br />$ mkdir /usr/lib/python2.4/site-packages/pysvn<br />$ cp pysvn/__init__.py /usr/lib/python2.4/site-packages/pysvn<br />$ cp pysvn/_pysvn.so /usr/lib/python2.4/site-packages/pysvn<br /></pre>
Now try again and you should get something like:<br />
<pre>$ python2.4<br />Python 2.4.3 (#2, Oct  6 2006, 07:52:30)<br />[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2<br />Type "help", "copyright", "credits" or "license" for more information.<br />&gt;&gt;&gt; import svn<br />&gt;&gt;&gt;<br /></pre><br /><b><br /></b><h3 class="Subheading"><b>Step 2: Installing SVNMailer</b></h3><b><br /></b>Go to <a href="http://storage.perlig.de/svnmailer/" target="_self">http://storage.perlig.de/svnmailer/</a> and fetch last tarball (stable actual one is: <a href="http://storage.perlig.de/svnmailer/svnmailer-1.0.8.tar.gz" target="_self">http://storage.perlig.de/svnmailer/svnmailer-1.0.8.tar.gz</a>)<br /><br />Fallow these steps:<br /><pre>$ tar xvzf svnmailer-1.0.8.tar.gz<br />   ...<br /><br />$ cd svnmailer-1.0.8<br />$ /usr/bin/python2.4 setup.py install<br />   ...<br /></pre><p> You have now a brand new svnmailer installed. Check it with:<br /></p><pre>$ ls -l /usr/bin/svnmailer<br />-rwxr-xr-x 1 root root 2192 2006-10-24 17:00 /usr/bin/svn-mailer</pre><b><br /></b><h3 class="Subheading"><b>3) Configure your repository to use svnmailer</b></h3><br /><p>We created a svn repository:</p><pre>$ svnadmin create /var/svn/repos1</pre>So we have a repository on our local filesystem in<b> /var/svn/repos1<br />
</b><br />Go into the hooks directory:<br /><pre>$ cd /var/svn/repos1/hooks</pre>Add/edit <b>post-commit</b> file.<br />And add the fallowing lines:<br /><pre>#!/bin/sh<br />REPOS="$1"<br />REV="$2"<br />/usr/bin/svn-mailer commit "$REPOS" "$REV" /etc/svn-mailer.conf</pre>Change execute permission on post-commit<br /><pre>chmod 755 post-commit<br /></pre>It's time to configure SVNMailer<br /><br /><h3 class="Subheading">4) Configure SVNMailer</h3><br />Edit/Add the file <b>/etc/svn-mailer.conf<br /></b>And add the fallowing lines [you might edit few things...]. Imagine that I have mymodule in my repository (so that i can do svn co file:///var/svn/repos1/mymodule)<b><br /><br /></b><pre>[general]<br /># see <a href="http://opensource.perlig.de/svnmailer/doc-1.0/#general" target="_self">http://opensource.perlig.de/svnmailer/doc-1.0/#general</a> for details.<br /><br /># the diff command to be used ... just copy it...<br />diff = /usr/bin/diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s<br /># the sendmail location<br />mail_command = /usr/sbin/sendmail<br /><br />[mymodule]<br /># see <a href="http://opensource.perlig.de/svnmailer/doc-1.0/#groups" target="_self">http://opensource.perlig.de/svnmailer/doc-1.0/#groups</a> for details<br /># this part of the config apply only for commits under mymodule<br />for_paths = mymodule/.*<br /><br /># the subject of the email<br />commit_subject_prefix = [MYMODULE]<br /><br /># From address in the mail<br />from_addr = jfroche@jfroche.be<br /><br /># To address ...<br />to_addr = peopleinterestinginmymodule@foo.bar<br /><br />[defaults]<br /># see <a href="http://opensource.perlig.de/svnmailer/doc-1.0/#groups" target="_self">http://opensource.perlig.de/svnmailer/doc-1.0/#groups</a> for details<br /># this part of the config apply for all the other module<br /><br /># Default From address template<br />from_addr = %(author)s@localhost.localdomain<br /><br /># the subject of the email <br />commit_subject_prefix = [SVN]<br />to_addr = jeff@jfroche.be foo@skynet.be bar@gmail.com<br />generate_diffs = add copy modify<br />suppress_deletes = yes<br /></pre>Here it is... Try to commit and you should get email...<br /><br />If you want to traceback error, go to edit /var/svn/repos1/hooks/post-commit and for example log to a file by changing the line<br /><pre>/usr/bin/svn-mailer commit "$REPOS" "$REV" /etc/svn-mailer.conf</pre>In <br /><pre>/usr/bin/svn-mailer commit "$REPOS" "$REV" /etc/svn-mailer.conf 2&gt; 1&gt; /tmp/svnmailer.log</pre>
Hope this helps ...<br />
          ]]>
        </content:encoded>        

        <dc:date>2006-10-24T18:10:28+02:00</dc:date>

        <dcterms:modified>2006-10-24T18:10:28+02:00</dcterms:modified>

        <dc:creator>jfroche</dc:creator>

        

        
            <dc:subject>general</dc:subject>
        

    </rss:item>

    
    

    <rss:item rdf:about="http://www.jfroche.be/blogging/archive/2006/04/05/blogging">

        <rss:title>Blogging...</rss:title>

        <rss:link>http://www.jfroche.be/blogging/archive/2006/04/05/blogging</rss:link>       

        <rss:description>What about me blogging?</rss:description>

        <content:encoded>
          <![CDATA[
          <p>Having a blog seems to be a really new fashion among differents communities (young people, developpeurs, scientists, artists ...). <br /></p><p>Blog is a short form for weblog in fact, principe is simple: display at the top the newest written article. <br />There is different kind of weblog:</p><ul><li>Personal : express the life's thoughts<br /></li><li>Professional : express professional experiences</li></ul><ul><li>Cultural : express all your culural (music, movie, paintings...) thoughts</li></ul><br /><p>Most of my stuffs will be about personal and professional expericences, General will be my personnal thoughts and the others will be topic oriented.</p><p>As Zope and Plone are part of my professional fun for the moment these are the actual topics. Don't know if I will be enough talkative to express what I see, feel but it's a good exercice for me. Taking also my place into this so big world...</p><p>My previous thoughts about blogging were very negative, thinking that most are unuseful and never read. They were like books inside a cellar that nobody read. Things are changing as you see. While working on a zope 3 stuff, I was yesterday thinking  "hey I should put that somewhere on a page..." and the weblog idea came up again. Don't want to tell myself "you should go there every night and at least write something", something that I will do during few days and stop, I know me. So let's say I will write here when i feel so without any dates constraints.</p><p>Spelling, grammar... I am a native french speaker that should take more english lessons. I don't want to write here in french as english is thecommon language in the zope/plone community. I hope people don't mind too much about that ?</p><br /><br />
          ]]>
        </content:encoded>        

        <dc:date>2006-04-05T17:30:03+02:00</dc:date>

        <dcterms:modified>2006-04-05T17:30:03+02:00</dcterms:modified>

        <dc:creator>jfroche</dc:creator>

        

        
            <dc:subject>general</dc:subject>
        

    </rss:item>

    

</rdf:RDF>
