Thursday, June 04, 2009

Running KirbyBase in IronPython

KirbyBase has a small but warm place in my heart as the first database I ever used in an application. It is a pure-Python single module database that stores its data in plain-text delimited files and has a Pythonic query syntax. Sure you don't want to run a high volume website with it but it is fun to use and experiment with.

Krishna Bhargav has been using it from IronPython and has written up a blog entry on how to get it working with IronPython 2.6:
As I was looking for embedded database systems, I came across this pure python database called KirbyBase. So I decided that I would make it run on IronPython. So this post describes on how to make KirbyBase run on IronPython and using ipy.exe. Note that I am not looking at integrating this database into C# application yet. [may be in the future post]
Using Python libraries from C# is an interesting topic (covered briefly in IronPython in Action of course) which I don't think enough people have experimented with. The need is to create a statically-typed wrapper layer which the C# can use and handles calling into Python and returning values.

In particular I'd like to see a C# wrapper using Ironclad, so that Numpy can be used from C#. There don't seem to be any open source libraries for .NET that are anything like as comprehensive.

There is also Curt Hagenlocher's Coils project which (if completed) could automatically generate the wrapper classes from Python class definitions.

No comments:

Post a comment

Note: only a member of this blog may post a comment.