python - 5.2.2011 - 27.7.2011

Sage: Open Source Mathematics Software. Simply because I've been thinking about worksheet interfaces lately and considering what options there are - Sage is not just a math package, but primarily a huge collection of Python modules and a worksheet interface for Python as well. Okay, you use a web browser against a locally running web server, but still, it's actually a nice thing. And meanwhile, version 4.7 with many changes is out. And you can repeat good things. It's definitely cheaper than mathematics and I also like Python much better as a programming language. Since I will probably eventually install my own server to access notebooks from anywhere, here's a blogmark on a guide on how to build your own Sage server with Ubuntu.

XMPPFLASK — XmppFlask v0.1 documentation. Definitely an interesting project - an XMPP bot in Python that has a similar structure to Flask, so simple definition for XMPP handlers with routing of events. Since I always wanted to take a look at XMPP as a backbone for distributed (so widely distributed) applications with online/offline capability, I've blogged about it.

Pattern Matching In Python. Interesting article for people like me, i.e. for people who like Snobol4 or its "successor" (in quotation marks, because it is then a completely different language) Icon and would like an alternative to regular expressions. Implements a pattern-matching system very similar to the Icon model, complete with backtracking and generators. However, it is from 2004 and is rather a proof-of-concept story, not necessarily a directly usable and installable Python module. Unlike SnoPy, it is pure Python and not a Swig-based wrapper for an Ada Library.

WSGID When your WSGI app becomes a nix daemon. Mongrel2 by Zed Shaw has interested me for quite some time, but the biggest drawback was that there are not many Python frameworks that work directly with Mongrel2. wsgid solves the problem, it is a WSGI server for Mongrel2 and can thus then connect frameworks that can run under WSGI - for example, Mongrel2 can be used as an HTTP server for a distributed Django installation. By using ZeroMQ in Mongrel2, the whole thing is then significantly more flexibly structured than with the classic (FCGI-based) server integrations.

Kivy: a crossplatform framework for creating NUI applications. Interesting new GUI library for Python, runs on various platforms (and in addition to the three major desktop environments, Android is already included as a mobile one) and can use OpenGL to accelerate output (internally they have a JIT that compiles the basic functions and thus enables fast execution).

Bulbflow: a New Python Framework for Graph Databases. Even though I keep thinking that graph databases are so 70s, not everything old is automatically bad - IMS is still around and very interesting for some purposes. And this sounds interesting, something like DBAPI for graph databases, so that you can change the database in your projects without having to rewrite everything completely.

asuhan / happy. Also not uninteresting: a PHP interpreter and compiler in Python based on the PyPy toolchain. Okay, it's not a showstopper, I don't think I've often had the question "how can I execute PHP code in Python" - but for example, if a site based on Django wants to provide users with PHP as a scripting language, something like this could become quite interesting - PHP is after all one of the best-known scripting languages for the web, but Python with some frameworks is simply much more interesting from a production perspective.

cfbolz / Pyrolog. Had I already seen this? A Prolog interpreter in Python that uses the PyPy toolchain. Could be very interesting if you need a bit of rule logic in your programs but don't necessarily want to use external tools for it.

Paver/paver. Sounds interesting, like a mix of SetupTools/DistUtils and Make (or their high-level counterparts Rake/Cake). I might take a look, as it could be quite practical for Python projects - although the standard Python tools are already quite useful.

Stiivi / cubes. Just bookmarked for later: an OLAP library in Python that can be built on SQL databases or MongoDB. This could be interesting for some things at work.

SymPy. Symbolic mathematics with Python directly in the Python shell. Together with NumPy for matrix operations and SciPy for various other scientific functions, Python becomes quite a respectable mathematics system. Nothing really new except perhaps SymPy itself.

PyPy Status Blog: Global Interpreter Lock, or how to kill it. Wow, that sounds good - the PyPy project wants to mitigate the GIL through STM (Software Transactional Memory) - and has quite an interesting approach for that. Some things are only possible through PyPy, because the corresponding infrastructure for code transformations is available there, which is missing in CPython.

The Larch Environment. Worth a look - a visual programming environment for Python. Interesting detail: objects are not just displayed textually, but also graphically represented via a dedicated mechanism - sounds a bit like output-recording from CLIM. Additionally, the whole thing is structured more like an interactive document - comparable to various mathematical systems (e.g., Mathematica or Maxima). Unfortunately, it's not based on the standard Python environment, but on Jython - so JVM as the runtime underneath.

I should check this out - it allows you to run AppEngine programs on your own servers that are based on Django (the AppEngine APIs are emulated using Django means). Certainly better than using the AppEngine Dev-Server directly.

Technical Discovery: Speeding up Python NumPy, Cython, and Weave. Interesting for number crunchers who don't necessarily want to switch to PyPy, but want to stay in the normal CPython world. Provides a quick comparison of NumPy, Weave, and Cython.

Leos Home Page. Leo is an outliner and data organizer - that's nothing special at first. But this one is written in Python and portable (everywhere there is PyQT, at least in version 4.9, older ones also had Tkinter as a surface library). Can also be used as an IDE for Python.

Python/Harmattan - MeeGo wiki. Very interesting in connection with the N9: a complete (and they really mean it - almost all parts of the system are accessible) API for MeeGo in Python. With this, you can program the entire phone completely in Python and also publish the applications created in this way in the Ovi Store (Nokia's variant of the AppStore). Nokia already had something similar with Symbian in the form of Python S60 and the tablets under the predecessor of MeeGo, so good Python support has almost become a tradition with them.

gcc python plugin and static analyser for CPython sources. In a very strange way cool. I mean, seriously: who looks at gcc and thinks spontaneously "oh, there I should embed a Python interpreter"? Yes, I know, the answer is "the author of this plugin". Strange things some people do ...

Skulpt. A Python implementation in JavaScript, client-side. Also in the browser. Nice hint that you shouldn't even try to crash the server, you would only stub your own toe ... (otherwise, this is probably one of the many projects "just because it can be done")

Florian (Author) thinks I might be interested in burrahobbit and he's right: persistent data structures (i.e., functional persistence) in Python, with time behavior comparable to normal data structures. So far, he has dictionaries and sets.

Comparison to Python | Cobra - just blogged for completeness, as the language has some interesting ideas. Specifically, I would like the contracts as explicit syntax, Python only allows similar things in a roundabout way. However, the language is otherwise just one of the many niche languages. And honestly, Python is more than just the indentation - what about the very sophisticated metaprotocol of Python in the various niche languages? PyPy in combination with Rpython and the new ctypes for pypy is much more interesting.

Writing Plugins for gedit 3 with Python. It looks like Gnome 3 actually gets a quite generic interface for Python scripting. PyGTK was already there, but that's just a GUI library. Now, work is being done on GObject and Friends, making many more elements accessible. By the way, gedit is a quite nice graphical editor that can certainly be considered an alternative to BBEdit or TextWrangler, which are popular under OSX.

Python Interpreter by Noam Gat -- Unity Asset Store. And this is more for my private tinkering: a plugin that integrates an interactive Python shell into Unity3D. Somehow, Unity3D always fascinates me when I see it. Especially since the entry is now free (unfortunately, the jump to Pro - which offers some essential tools like a profiler or support for external versioning - is quite steep).

micromongo — micromongo v0.1 documentation. Also check out micromongo, it provides a minimal ORM for MongoDB servers. However, I would have to check if django-nosql already supports MongoDB by now, then I wouldn't have to use a different ORM syntax - although micromongo is really quite lean and is based only on pymongo, so for example nice for small web services, because you don't have to install a bunch of modules.

execnet v1.0.9 documentation. I should also check this out, it's basically a library for distributing functions across a network of instances - not a full map/reduce or similar, more like a better RPC. Specifically interesting to use, for example, a normal cpython front with a compute backend based on PyPy (or vice versa, to give a PyPy server a numpy+scipy backend in CPython for data analysis).

pmundkur/odisco. An implementation of Map/Reduce according to the Disco Worker model in Objective Caml. There's already something like this for Python. If I ever want to play around with OCaml again.

Reinteract might be interesting for all number crunchers and graphics players, provided they don't get pimples from Python: an implementation of worksheets as you know them from Mathematica and Sage, but as a direct Python application based on PyGTK. You can hack in and execute Python source code, edit older source code afterward, and your output in the worksheet will be automatically updated. Downloads are also available for OSX. Unfortunately, PyGTK is not a 1st-class citizen of the Mac environment - it just looks awful with the half-defective controls, and the usability is unfortunately not really OSX-like. Someone could port this to Cocoa.

bconstantin / django_polymorphic. Why am I only finding this now? This is a very nice thing for Django projects with inherited models - as soon as you make accesses to a common model class, you only get instances of the common model class with Django - but with Django-Polymorphic you get instances of the concrete subclasses. In principle, this makes the ORM more of an object database. However, this might come at the expense of performance, as more SQL queries are generated.

birkenfeld / karnickel. Quite a weird thing: Macros at AST level for Python. However, in a form that rather reminds of C macros - so simple expression macros (and quite limited block macros). Above all, you get all the nasty problems of such an unhygienic macro system - like name conflicts between macro-local variables and outer variables. It's also rather just proof that it works and what you can do with the AST module delivered with Python.

Pygame Subset for Android. Wow - there is a PyGame subset for Android. Usage is a bit clunky because there is no IDE - you have to place the files on the SD card (hmm - a Nexus S doesn't have an SD card, where does that go there?) and edit them otherwise.

android-scripting - Scripting Layer for Android brings scripting languages to Android.. Interesting project with which you can run various scripting languages on Android phones. Support for Shell, Python, Perl, Ruby, Lua, TCL and JavaScript is already included. For me, Python is of course particularly interesting. Especially because the Android API is made available - you can thus directly interactively or scripted play around with the things.

PyPy Status Blog: PyPy 1.5 Released: Catching Up. Yay! PyPy is now on par with CPython 2.7! And again a few additional performance improvements. Moreover, the interface for CPython extension modules (i.e. those not written in Python) has been improved, first successes are Tkinter and IDLE.

kiorky/spynner. Wow, that sounds really interesting - a programmatic (i.e., without a user interface) web browser based on QtWebkit as a Python extension. The advantage? Since a full web engine is underneath, you can use all the features of the web browser - for example, client-side JavaScript and all the other things used in web applications. This could be very interesting for automated testing of web applications - or for scraping more complex websites.

tvON / python-wordpress. And to get posts and images into WordPress, I could work with this - a Python library that provides various WordPress functions. However, it comes in different versions, in different states of non-maintenance, so I have to go through it and see if everything runs as I want it to.

Backing Up Flickr. Because I just stumbled over it (I'm looking for ways to automatically push Flickr uploads to the WordPress media library, preferably from the server, without me always having to manually intervene. For this, I would actually have to marry this with WordPress functions (it is a Python script that backs up Flickr images to directories). The backup functionality works, by the way. Maybe not such a bad idea to back up your Flickr account from time to time ...

Gondor — effortless production Django hosting. Hmm, that sounds quite interesting - a tool for easier deployment including database migrations (via South). As far as I understand, it is tied to their infrastructure - so rather an alternative to Google AppEngine, directly based on Python.

agronholm / jython-swingutils. No idea what I could do with it yet, but if the Java world ever becomes interesting, this could become an interesting GUI library (Swing for Jython).

Python Package Index : pip 1.0. For the sake of completeness, I'm blogging this even though pip is already a fixed part of the Python infrastructure for me. But maybe one or the other has not yet played around with pip, then now is probably the right time to do so. In my opinion, you should always use it together with virtualenv, because then you can easily install exactly the right dependencies for each project and keep them separate from other projects.

sunng87/jip. I'm not currently doing much with Jython, but jip sounds very practical: it's an analog to pip, but for Java libraries. So a simple command-line tool that downloads the necessary jar files and puts them in the right place. Integrated with virtualenv. Much more pleasant for me than, for example, dealing with Maven or similar Java-usual infrastructure tools.

philikon / python-weave client is even more interesting than the other tool: a Python library for accessing Mozilla Sync. With this, I could build various small tools that automatically mix links into bookmarks or extract them from the sync and move them into other bookmark files. Or how about a cron job that takes links from bookmarks in a special group and automatically posts them to the weblog? All sorts of fun things are possible ...

Pipe is a module with infix syntax for chained function calls over potentially lazy streams (internally these are generators). Unlike stream (which I mentioned here before), it does not support parallelism, so it's just syntactic sugar. However, I prefer the sugar from stream (i.e., the syntax) and the parallelism of stream is also more interesting than just providing a slightly different syntax.

Django-nonrel - NoSQL support for Django. Provides a first approach to integrating various NoSQL databases into Django at the level of the Django ORM. Backends for MongoDB (no thanks), AppEngine and Cassandra are in the works. Cassandra is particularly interesting to me at the moment.

pdict.py at master from segfaulthunter/sandbox - GitHub. A PersistentHashMap for Python - so a functional data structure that does not allow changes, but provides a new structure with minimal change compared to an existing structure with substructure sharing to the original structure. A rather interesting implementation. There are also further explanations of the ideas behind it. And an alternative implementation of the same idea.

Python Tools for Visual Studio. If you are on Windows and a number cruncher - SciPy and NumPy are now directly available on the .NET platform with these tools. And I wonder why Apple doesn't include something like this with Xcode, as it would certainly be popular in the university environment (just think of Sage).

fantasm - Project Hosting on Google Code. Definitely worth checking out, a workflow engine in Python. Something like this could be quite interesting for projects at work.

Pyjamas - Python Javascript Compiler, Desktop Widget Set and RIA Web Framework. I already mentioned this in the old blog, but a) a lot has happened and b) it came up again today as a topic, so I'm blogging about it again.

PyPy Status Blog: PyPy Winter Sprint Report. Most important point: fast-forward is in Trunk, so the next version of PyPy will definitely have 2.7 compatibility.

scgi-wsgi 1.1 released - Allan Saddi's projects blog - so far we have been using its FLUP-based server that comes with Django, but the option to switch to mod_prox_scgi would be interesting because we could effectively save one server in between and no longer have to work with ajp. Although ajp is not that bad either - so maybe just do a few tests. For simple web services, however, I will continue to use the wsgi server based on gevent that I have been using in deezeit, because it is simply incredibly fast and uses almost no resources.

RUR-PLE is something like Logo, only with Python instead of Logo as the language. So actually just the graphical environment of typical Logo implementations. In any case, a nice toy.

How to write vim plugins with python. Because I like Python, because I like Vim and because you always want to build smaller things that make life easier. And because Vim's own scripting language is rather awful.