Python Programming, news on the Voidspace Python Projects and all things techie.

Movable Python for Python 2.5rc2

emoticon:movpy2 Movable Python for Python 2.5rc2 is now available. As usual, it can be downloaded from :

The Movable Python Groups Pages

This is nearly your last chance to get Movable Python at the reduced price of £3.99. Python 2.5 final is due on September 19th.

In the meantime I'm writing up the new documentation, fixing a few minor bugs and polishing up the default configuration options. I'm hoping that an updated release will be out about the same time as the new Python.

Thanks to users who have provided me with feedback, especially to Patrick Vrijland.

Like this post? Digg it or it.

Posted by Fuzzyman on 2006-09-14 23:36:36 | |

Categories: ,

Snakes on the Brain

emoticon:python Pycon 2007 is coming soon, and they're looking for a slogan.

My suggestions are :

  • Python: The Science Behind the Art
  • Python aint no constrictor
  • You should have seen me smile, the day I lost my braces
  • What does Pythonic mean ?
  • Python: It's Serious Business Stuff
  • Choose Python: or Someone is Going to Get Fired
  • Python: It's a Freedom Thing

My personal favourite is Snakes on the Brain [1]. Smile

I have suggested a talk for PyCon 2007, I'll let you know if it gets accepted...

[1]There are plenty of other good ones though.

Like this post? Digg it or it.

Posted by Fuzzyman on 2006-09-14 23:33:03 | |

Categories: ,


emoticon:html Anyone know a simple Python project that can take the top few items from an RSS feed and convert them into an HTML fragment ?

I'd like to include some individual RSS feeds in a web page, via SSI. I need a script (which can run by cron job) to turn the RSS feed into an HTML fragment. I can then run a cron job to update it.

There are lots of PHP scripts that will do this, but I don't want to install PHP on my server. Smile

I'm sure this is easy using Feedparser, but there are lots of projects I'm behind schedule on that are a higher priority.

Like this post? Digg it or it.

Posted by Fuzzyman on 2006-09-14 15:01:06 | |

Categories: ,

Dynamic Languages on the CLR

emoticon:firefox IronPython 1.0 final has just been announced. This is a full implementation of the Python 2.4 spec for the CLR platform. For an illustration of the power and capabilities of IronPython, see The Screening Room #8: IronPython by Jim Hugunin (about 30mins).

IronPython has been developed by a Microsoft team in order to develop (and demonstrate) the capability of the CLR to host dynamic languages. Multiple languages on a single runtime brings up the interesting theoretical possibility of 'language interoperability'. For example see the following article : Polyglot Programming.

However, most developers don't want to develop in multiple languages. They do however recognise that different languages have different capabilities, and the ability for two languages to co-exist is interesting if they are useful for different tasks.

IronPython is interesting for the following reasons :

  • It is a full development language that is less verbose (more readable) than C#, and preferred by many. Large applications can be developed in IronPython, requiring very little C# to access the full power of the .NET framework. This will particularly be of interest to existing Python developers. The Windows Forms framework provides a way to create professional looking, native applications, for Windows. There is no comparable framework for CPython. Through Mono, available for Linux and the Mac, it is possible to write cross-platform applications with IronPython.

  • Because of the language interoperability afforded by the CLR, extending IronPython (adding features) from C# is very easy. Much easier than extending CPython with C ! Again, mainly of interest to Python programmers.

  • Python is a dynamically typed language, with an interpreter. This means you can do some things that can't be done in C# (e.g. functional programming, metaprogramming, dynamically modifying classes, duck-typing).

    • Using the interpreter you can experiment with objects and methods (invaluable when you need to check how something works)
    • You can embed IronPython in your application and examine the state of your application and its objects. Invaluable for debugging.
  • IronPython can be embedded in an application (and certain parts of your application exposed to the IronPython engine). This means you can add a scripting language (for your users) to a .NET application very easily.

  • Because of the language syntax and dynamic features, Python is often used as a 'RAD' tool. Prototypes of applications can be quickly created in Python, and then ported to C#. The IronPython compiler itself was developed in this way.

Limitations :

  • Because of 'name-mangling' (Python code is effectively dynamically compiled by IronPython) it is difficult to use classes defined in IronPython from C# [1]. Instead you call the IronPython engine, passing variables in, and are returned values. You can however pass native .NET data-types back and forth.
  • C# attributes aren't supported by IronPython. That means it can't be used with ASP.NET or with webservices etc. A small amount of 'stub' C# code gets around a lot of problems caused by missing attributes.
  • Being dynamically typed, IronPython code is not type safe. (The compiler will not warn you about type errors, instead you get runtime errors.) The best counter to this is covered in the Bruce Eckel article Strong Typing versus Strong Testing.

If you're looking for a good introduction to IronPython, you could do a lot worse than this article: CLR Inside Out.

[1]This recipe demonstrates the recommended approach.

Like this post? Digg it or it.

Posted by Fuzzyman on 2006-09-14 13:50:04 | |

Categories: , ,

Pythons in Belfast

emoticon:dollars I'm currently on holiday in Northern Ireland. We've been here a week, and fly home tomorrow. Normal service will be resumed shortly... Smile

Python in Belfast

This photo was taken in the Belfast botanical gardens.

The Real Thing in Belfast Zoo

And this is a Royal Python, from Belfast Zoo. Wink

Whilst we were there, we went and saw the film Snakes on a Plane. It's good fun. I've been a week without programming, but lots of Pythons still involved. Razz

Like this post? Digg it or it.

Posted by Fuzzyman on 2006-09-12 23:02:37 | |

Categories: ,

Hosted by Webfaction