I am glad to announce that IronPython 2 is now capable of running my XMPP
Python library: headstock.
.NET has already an excellent XMPP SDK called agsXMPP that is a native
.NET/C# framework. However I’m a Python developers at heart and I had
started quite a while ago writing my own XMPP library in Python using the
most excellent Kamaelia framework (designed for concurrency).
For a while IronPython had severe shortcomings that prevented it running
simple Kamaelia applications. Today I was able to run a simplechat demo
using a vanilla IP2 on Windows with only one single modification to the
logging module (thanks Seo). To be honest I didn’t expect it to go through
The chat demo is simple enough but means more complex examples using XMPP
PubSub will work as well (they are all based on the same framework).
Now this isn’t production ready or anything. For instance the TLS support
is broken (hopefully something easy enough to fix) so you won’t be able to
connect to Google Talk for now.
Moreover I’m not sure the code is that fast considering how I had to
simulate an incremental XML parser atop System.Xml (this allows for a
XML stream to be parsed without requiring the full document or even
fragment to be read first).
This is a great news for me because it means I’ll be able to move ahead
with more work using IronPython 2.
Expert Python Programming by Tarek ZiadÃ© is a great book that I recommend to anyone wishing to explore Python in a professional fashion.
The book covers topics that aren’t usual for Python books, at least to my knowledge, like how to build, package, release, distribute your software using tools that have become de facto standards in the Python community (setuptools, paste, zc.buildout, etc.). The book also gently introduces the reader to distributed version control and test-driven development.
The book has 14 chapters and I really believe chapters 5 to 13 are worth every penny. They focus on the delivery of software from building to distributing through testing and optimizing. There is a little something for everyone there and I agree with the book saying it’s an authoritative reference on the subject. If you want an extensive resource on the process of moving from a personal project to a professional one, these chapters are what you need. Of course these chapters aren’t exhaustive but do offer enough meat to get you going and whet your appetite.
Tarek has a great experience in those fields an it transpires he surely wanted to include more content but that would have probably made the book harder to follow.
The “it depends on who you are and what you’ll be looking for”
I don’t want to say bad as it’s only my own opinion here but, I wasn’t convinced about chapters 1 to 4 nor was I about chapter 14. They deal with mainly advanced Python programming dos and donts: iterators, metaclasses, MRO, design patterns. Sadly, I didn’t feel they belonged to the topic of the book. They are interesting on their own but make the book less tight, as if it had started in one direction and suddenly shifted. That being said, they are useful as a reference and even if they aren’t always crystal clear, they are an enjoyable source of information.
Writing a book of this nature is hard because it’s large in scope but also in audience. Tarek explains that the book aims at Python developers but that in some instances project managers may find it useful. This is probably true if they were developers at some point. Expert Python Programming is a rich technical book which names isn’t too cocky considering its content.
Not only did I enjoy the book I also brought it to the office as it was immediatly useful to a case I was working on. Recommended.