Document Actions

Summaries Python Users Netherlands meeting in Utrecht

Filed Under:

Meeting of the Python Users Netherlands group. This evening was organised by Nelen & Schuurmans in Utrecht on 16 February 2011.

My brother Reinout (who was the main organiser) also has summaries.

Christo Butcher (Fox IT): Trac with python

Sorry, I came in late and missed the first part of this talk and was eating during the second part. :-)

Maurits van Rees (Zest Software): Theming with xdv, Paste and fanstatic

Since a few days I use xdv, Paste and fanstatic to put a new theme around my old Plone 2.5 website. The code is available on github and can be instructive as an example of these technologies:

See the slides.

Jan-Wijbrand Kolman (The Health Agency): Publish your changes

I do a lot of releases, especially for Grok and the Zope Toolkit. So I look a lot at the Python Package Index (PyPI) to see which changes have been made in packages.

Quote: "Zope Community and Friends: I love you so much for putting changelogs in your PyPI info." (jshell)

Compare e.g. Sphinx and grokcore.component on PyPI. Sphinx hardly says anything on its PyPI page. grokcore.component is much smaller but publishes a lot more info right there on PyPI, especially its changelog. Add that to your packages and give them a meaningful package description. It is probably the first page someone sees for most packages, so you had better leave a good first impression.

Jasper Spaans (Fox IT): pypy rocks, even in the real world

(Note: pypy is not PyPI.) Pypy puts a python in your pythons. It is a python interpreter implemented in RPython, restricted python. You can do memory management also in RPython, so you don't need to handle, understand and write C code if you need your own specific memory management. It should be a drop-in replacement for normal python (CPython) in most cases. It offers a possibility for a JIT optimizer, which can make your code faster.

We tried pypy a few weeks ago. We encountered some SyntaxErrors, as version 1.4.1 only supports python 2.5). Class decorators are not supported yet (so we decorated manually). The with-statement needs to be imported from __future__. Memory usage exploded (fixed by changing to the hybrid garbage collection). SQLAlchemy was too hairy; for that part we put in a bit of standard python to handle the SQLAlchemy integration, together with protobuf.

Several of our performance tests showed improvements of 7 to 13 percent when using pypy. The memory usage was 20 percent higher though.

Reinout van Rees (Nelen & Schuurmans): Geographic information websites for water management

Our customers are mostly government agencies working in water management. They have a lot of information about water. We make that info available in a format that is easier for them, on a website. Customers can click through maps in our application to get info. What technology do we use? Lots of python!

  • Mapnik: uses the rendering engine from Openstreetmap. You have points, lines and grids. It understands the WMS standard for web mapping. It gives a .png file as output.
  • Gdal: used behind the scenes mostly, for grids.
  • Matplotlib: a graph library. It can do everything. Others are easier, but wit limitations. Several customes have too many peculiar wishes that are difficult to do with other packages, if it is possible at all. (Remark from the audience: use protovis.)
  • Pyproj. You have various measurements for where on the globe you are: rijksdriehoek (in the Netherlands), degrees, Google mercator. Pyproj translates between these.
  • On the client side we use jquery, openlayers, and the blueprint css framework.

We have a layered software structure:

  • core: splitting everything up.
  • lizard-ui: defines the html page structure.
  • lizard-map: this is the big python/django application that we have, the core of the map. Map visualisation; basic graph and search handling; basic popups; plugin mechanism for adapters (using extra attributes in html5) with which you can search, get a layer and show the corresponding html in a popup.


  • We have collective code ownership. Everyone can touch all the code. For most of the code everyone has a basic understanding of what is going on. We want code that conforms to the pep8 and pyflakes standards. For automatically running the tests we use Jenkins (formerly known as Hudson). We borrow each others brains: sit with each other to check ideas that you have for sanity.
  • Documentation is generated by Sphinx.

Our clients are mostly governmental and they like it when they use open source, so we have open sourced our code, also because it uses a lot of open source itself. This also attracts me to the company.

See and

We want you! Business is booming! See

Coen Nengerman (Nelen & Schuurmans): ArcGIS

I studied hydrology; I am more a python user, not a developer. ArcGIS is a professional tool to manage your geographical information. It makes lots of info and tools available in a nice UI. Catalog, tools, python scripts using e.g. scipy and numpy, including an integrated python command line. It can find maps online as well, like buienradar or maps of the flooding in Pakistan.

Jan-Jaap Driessen (The Health Agency): fanstatic

Fanstatic is a python package for resource management: css and javascript files. I am using zope and grok. Getting resources from zope can be slow, because lots of checks are done, for example authentication and authorization, which is not always needed. Usually you include too much resources on all pages, because you do not know for sure which of them you need for a specific page. Fanstatic fixes this for you. The fanstatic middleware will figure out which resources you really need and serve them to you.

You could download a jquery package from somewhere and put it in your own code, but we want to create python packages for this so you can easy_install them (js.jquery, js.yui). There is no real management of dependencies in the javascript world currently like there is for python, so for now we create python packages that define these dependencies.

Fanstatic minimizes http requests by doing rollup, bundling, using a cdn (content delivery network that hosts common javascript resources) if available, and versioning a resource so it can be cached for ten years in a browser without getting stale: when you change the resource a version with a new id is requested in the html. It takes hints from Steve Souders at

On the roadmap (some already on branches): bundling, cdn, compile for minification (google closure compiler), lazy loading (google loader, requirejs), commonjs.

Nico de Groot (Tilburg School of Theology): web2py

web2py is easy to learn, stable, secure, light weight, faster than zope ;-), can use different kinds of databases, can run inside Google Apps, some mercurial integration.

At the top you have applications consisting of plugins. In the middle there is gluon (old name of web2py) and general libraries like simplejson, and at the bottom the rocket server.

Jean-Paul Ladage (Zest Software): Prettig Personeel

Prettig Personeel is an online human resource management system created by Zest Software using Plone. You can generate contracts, get reminders that contracts are ending or for birthdays or for people who have been ill for a long time.

When you view an employee in this web application there are lots of boxes with info in which you can view, add and edit contracts, etc. We developed jquery.pyproxy to handle this. With that, you can use jquery within python (works in Plone and Django). You can use all manipulation and effects of the jQuery API. The result is returned as an xml response for an AJAX call so it gets processed on the client side in the browser.

It's on pypi and github: