Weblogtail /dev/mind > blog 2008-01-08OpenOffice with buildoutsEasy install the pyuno library with buildout This recipe was started by Infrae, I have added the pyuno egg creation within the recipe. It is so nice to be able to share code so easily ! Download OpenOffice in a buildout might sound odd but
The python uno library (aka pyuno) is only delivered with OpenOffice. The library provides access to all OpenOffice UNO api which means:
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 Xvfb This recipe can
More info about installation and usage of this recipe on pypi 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 here ;) 2007-12-10Zope 3 dependencies in Zope 2 buildoutDescribe a buildout recipe to avoid fetching zope 3 libraries when installing eggs with zope 3 depedencies in a zope 2 buildout 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 ... So if you list your zope library :
You will get
Where each of these file will be seen for setuptools as an egg: $ cat yourbuildout/develop-eggs/zope.app.component.egg-info Sure this might look like an ugly hook but I can't wait for zope 2 eggification 2007-12-06Buildout and VirtualenvHow and why use buildout with virtualenv Buildout is this wonderful tool which helps you to automate setup and configuration of your applications. Virtualenv is a tool which will help you to isolate your python environment 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 sqlalchemy 0.4 in my global sites-package and my buildout based application was using sqlalchemy 0.3.8 ... Here is a simple solution to avoid this kind of things.Idea is to start buildout with a python free of any external library. Virtualenv is the answer. Install VirtualenvEasy:$ easy_install virtualenv you will have then a file that you can run: /usr/bin/virtualenv Let's say you have a buildout configuration go into it: $ cd myApp.buildoutNow you just have to create the python environment without any access to the global site-packages with virtualenv: $ virtualenv --no-site-packages .You will have then your new python in the bin folder : $ ls -l binYou can now run the buildout configuration with your new python: $ ./bin/python2.4 bootstrap.pyThis will create you a nice and totally isolated environment ... 2007-04-28Write nicer Python codeStarting from the basic facts:
It exists a few very interesting softwares that can help you. command Pyflakes :call Pyflakes() command Pylint :call Pylint()
autocmd BufWrite *.{py} :call Pyflakes()2006-10-24Watch my new commit...
Filed Under:
Get notification as soon as somebody commit is really important! A quick note to set it up with emails... We will make this in 4 steps. Step 1: Installing pysvnCheck that you don't have it yet:$ python2.4If you get something else (e.g ImportError: No module named svn) you will need to do this step: You will need the python library to access subversion: pysvn. Note that header of the libsvn are required [should come with your subversion install]! Go to http://pysvn.tigris.org/project_downloads.html and fetch last tarball (MacOSX version also available). Note that pysvn is noted there as "Extension". I fetched last stable version: http://pysvn.tigris.org/files/documents/1233/34994/pysvn-1.5.0.tar.gz $ tar xvzf pysvn-1.5.0.tar.gzNow try again and you should get something like: $ python2.4 Step 2: Installing SVNMailerGo to http://storage.perlig.de/svnmailer/ and fetch last tarball (stable actual one is: http://storage.perlig.de/svnmailer/svnmailer-1.0.8.tar.gz) Fallow these steps: $ tar xvzf svnmailer-1.0.8.tar.gz You have now a brand new svnmailer installed. Check it with: $ ls -l /usr/bin/svnmailer 3) Configure your repository to use svnmailerWe created a svn repository: $ svnadmin create /var/svn/repos1So we have a repository on our local filesystem in /var/svn/repos1 Go into the hooks directory: $ cd /var/svn/repos1/hooksAdd/edit post-commit file. And add the fallowing lines: #!/bin/shChange execute permission on post-commit chmod 755 post-commitIt's time to configure SVNMailer 4) Configure SVNMailerEdit/Add the file /etc/svn-mailer.conf 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) [general]Here it is... Try to commit and you should get email... 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 /usr/bin/svn-mailer commit "$REPOS" "$REV" /etc/svn-mailer.confIn /usr/bin/svn-mailer commit "$REPOS" "$REV" /etc/svn-mailer.conf 2> 1> /tmp/svnmailer.logHope this helps ... 2006-04-05Blogging...
Filed Under:
What about me blogging? Having a blog seems to be a really new fashion among differents communities (young people, developpeurs, scientists, artists ...). Blog is a short form for weblog in fact, principe is simple: display at the top the newest written article.
Most of my stuffs will be about personal and professional expericences, General will be my personnal thoughts and the others will be topic oriented. 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... 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. 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 ? |