Software for Python presentations

Posted by Graham Stratton Sat, 30 Jun 2007 12:16:04 GMT

Whilst trying to prepare my EuroPython presentation, I encountered the severe lack of a presentation program for the task. I certainly don’t have time to create such a program at the moment, but I thought I’d write down the requirements anyway. I suspect most of the necessary components are available, so it would just be a matter of integrating them.

What I’d like is a program that understands that certain sections are code snippets, allowing doctest to be run on them and providing syntax highlighting. That’s probably about it, really. I guess the obvious solution would be an extension to ReST doctests, in order to indicate presentation-specific information such as slide boundaries (is that it?). That would probably be enough to be useful, and would make it very easy to make a document out of a slideshow and vice versa.

Any advice on components to create such a system would be gratefully received!

Posted in ,  | 3 comments

Europython 2006

Posted by Graham Stratton Thu, 13 Jul 2006 21:56:00 GMT

I wrote most of this pretty much the day after I returned from Europython, but I haven't gotten round to posting it until now.

<sidenote>

I don't like markdown. Apparently it's meant to be as much like plain text as possible, but which do you do:

Heading
=======

or

###Heading###

?

Hashes being so much effort to type on Mac doesn't make them any more endearing, either. We need a Zope 3 blog application!

</sidenote>

Introduction

Notes from Europython 2006, at CERN in Switzerland. As last year, the conference was great fun, really interesting and left my brain crammed with ideas. I hope I got most of them written down!

I think that there were slightly fewer people there this year, but the enthusiam and number of interesting projects seemed to still be very high. I'm happy python's still en route to taking over the world. Not quickly, but it's getting there. Ironically the IT industry seems to be one of the slowest moving out there.

Web Frameworks

In a stark contrast to last year, when there were oodles of Zope talks and no other Python web frameworks, this year most of the talk was about the three new Python web frameworks: Django, TurboGears and Pylons.

Zope

Europython definitely left me with the impression that Zope is losing momentum. This doesn't necessarily the end for Zope; firstly, it could just be an illusion, as people were too busy being enthusiastic about other frameworks. But more importantly, there never have been that many sites built with raw Zope; Zope's success has been with the use of Plone and other CMSs built on it.

However, I do feel that the Zope 3 project is losing momentum. Most of the ideas have been experimented with, and what remains is the hard slog to make existing applications reasonably compatible with it. There's a limit to how many more major architectural changes people will put up with once major projects start to be built with it.

Zope 3 in general feels too complex to me at the moment. There were few major changes in the last release; most of them were removals of 'convenience ZCML' directives, which, whilst I agree with Philipp that the changes make Zope 3 a bit easier to understand, don't really make life any easier. The component architecture is wonderful, but there's a big step between that and a working web application.

I think that either Zope 3 is too complex, and most people will never understand it well enough to use it, or there's just far too big a gap from the books to what you need to know and understand to write an application. Maybe not on the implementation side, but in terms of data structuring and things like that. There have been a lot of discussions on the mailing lists about how to do many to many relations, whether one should do a direct object reference, and things like that. Most users could probably manage to do one way or another, but get stuck on trying to work out which one to do.

Tarek's talk on zope-cookbook.org was quite interesting for me. I had assumed that it was just a place people could upload random docs, but it's actually very carefully planned and structured. If it gets a lot more recipes in it, it should become a very valuable resource. I think it probably needs a lot more design guides. Working out how to do things is hard, but nowhere near as hard as working out what should be done in the first place.

The new boys

I attended talks on TurboGears, Django and Pylons, but didn't really take in too much, and I can't entirely remember which is which. Maybe someone will draw up a comparison table showing which ORM, templating engine, etc, each of them use. I was impressed by the number of things Pylons does using WSGI; adding functionality using WSGI demonstrates that components are genuinely easily pluggable.

Ajax

For some reason it is customary to write Ajax rather than AJAX. A year ago, Ajax was pretty new, with Google maps and Gmail being the main users. Today no framework will succeed without Ajax support. Tarek Ziade of Nuxeo gave a talk on the state of the art. He covered a number of approaches.

Firstly, CrackAjax is a tool to convert python into Ajax. I guess the number of constructs is quite limited, unlike an Ajax backend for pypy, which was apparently demonstrated at the conference. CrackAjax has not been developed for about 8 months.

Azax allows you to describe the JS behaviour in an XML file, though the number of possible behaviours is currently quite limited.

Tarek's recommended solution is a client-side framework, the two examples he suggested being Scriptaculous with Prototype, and MochiKit. Tarek has been good and uploaded his slides; they're certainly worth a look if you need to do Ajax in python web apps.

WSGI

The Weally Simple Gateway Interface, defined in PEP 333, is gathering pace rapidly as people realise just how powerful it is. James Gardner's talk on WSGI covers the topic nicely, and he has also uploaded slides, so I refer the reader to them. Also look at Pylons, a web framework where most of the components are integrated using WSGI.

CPSSkins

This is a very impressive technology allowing through-the-web development of web designs using a very cunning bit of Ajax on top of Zope 3. Just drag and drop your portlets and data widgets, and you're done. How cool is that going to be? There are demos at www.z3lab.org http://www.z3lab.org/sections/front-page/design-features/news-portlet-widget

Language

Python 3000

Guido's keynote on Python 3000 was, for me, very encouraging for the future of the language. At present there are not too many new and complex features coming into the language; the major changes will be getting rid of bug-inducing features.

The announcement that print will become a function instead of a statement prompted a synchronised intake of breath through the whole lecture theatre. The argument is that, well, it should be, and it makes it much easier to replace printing with logging during application development.

Relative imports will have to be explicit. Hooray!

PyPy

Unfortunately I didn't get to attend many of the pypy talks. However, the lightning talk on the features of pypy 3000 was encouraging; the core team are still highly enthusiastic about the project and its potential. There are still plenty of ridiculous sounding ideas going rounds, such as being able to change the interpreter being used at runtime, which gives me great faith in the project. It hasn't got too serious yet, and is continuing to be the research project it set out to be.

Of course, pypy isn't really a python compiler, it's really a generic compiler. Obviously the first thing you want to compile is the compiler itself, just because it's cool, but now that's done, the options are pretty much unlimited. Whether pypy ever makes python interpretation as fast as C remains to be seen!

Libraries

zc.buildout

Jim Fulton introduced zc.buildout, a tool for setting up environments with many software packages. It's not Zope specific; it builds on eggs, adding the flexibility required to be able to guarantee the correct versions of different packages and databases for development and deployment. Well worth a look, IMO. Jim has also been nice and uploaded slides.

Applications

Mercurial

Mercurial is yet another source control management tool. But it's written in python, and applies patches much faster than subversion, whilst using less memory and having a smaller repository. Apparently it doesn't deal with conflicts as well as darcs does. Mercurial has been selected as the SCM tool for OpenSolaris; it's ideally suited to this, as it's an environment where people may regularly want to apply hundreds of patches to customise a standard source tree.

MailManager

MailManager has been around for quite a long while. LogicalWare were one of the first Open Source companies in the UK to secure funding. MailManager allows companies to distribute mail to enquiry and support helplines internally, and to track messages.

LogicalWare sell this software as a service, or as support, or as pre-installed boxes. Sadly they do not receive that many contributions to the project from the open source community. It is always hard for a company to get such contributions, and it is interesting seeing which companies succeed. I think Zope corporation does better because other people are using the software for their own projects continually, so are more likely to improve it that a system like MailManager which is installed and left, probably not by a developer.

Business

A discussion on the last afternoon concluded that to support customers, a good model may be to have a connected issue tracker, for customer use, and a bug tracker for developer use. This is the model used by Launchpad. It seems a good model, so I'd be surprised if there isn't already a product which offers this solution.

Summary

Well, thanks for reading. I'd be keen to hear other opinions!

Posted in , , ,  | no comments

One thing leads to another...

Posted by Graham Stratton Tue, 17 Jan 2006 09:46:00 GMT

I need a more interesting name for my blog. Last night I thought ‘import this’ would be good. Oh well. Not only has it been done, it’s been done by someone whose primary interests are python and ruby web frameworks.

However, from that blog I did come across a small conference in the states called Snakes and Rubies, and the website has some interesting information from it.

I haven’t heard on any dedicated UK python conference, uk ruby conference, or uk rails conference. I wonder how many people would be interested if such an event happened. I’d guess there are enough enthusiasts in the UK. Anyone else out there interested?

Posted in , , ,  | no comments