Archive

Archive for December, 2010

HOWTO: Installing Spring Python and its dependencies

December 17th, 2010 Comments off

Depending on your exact needs and the work environment, there are several ways to install Spring Python with its dependencies and this post will go through what’s available.

First thing is, install pip, this is the command line tool to use for installing Python software.

Here are the installation options:

  1. Telling pip to fetch it from PyPI and then install it, type:
    • pip install springpython, this will download the latest version – currently it’s 1.2.0RC1 – from the remote repository and install it
  2. Downloading the source installer from the Spring Source site manually – the link always points to the latest release of Spring Python though you can also pick from any previous releases. At the time of this writing, the latest release is springpython-1.2.0.RC1.tar.gz, place it in any directory and type pip install springpython-1.2.0.RC1.tar.gz to install it.
  3. Using the latest git version (read only) – create a directory, cd to it and type:
    • git clone git://git.springsource.org/spring-python/spring-python.git, this will create a local clone of the latest version of the source code
    • cd spring-python
    • python build.py –package, note the name of a tar.gz package that will be created, in my case it was springpython-1.3.0.BUILD-20101216115817
    • pip install target/artifacts/springpython-1.3.0.BUILD-20101216115817.tar.gz to install the newly built package
  4. Using the latest git version (read/write, for core developers) – same as the previous point except for the first command, its should be git clone git@git.springsource.org:spring-python/spring-python.git, note that the command is very similar to the previous one and for me personally it used to be a source of confusion, but that I guess is a git thing.
  5. Using the DEB installer created by Sven Wilhelm and Miguel Landaeta
    • Add deb http://ppa.wiredobjects.eu/springpython/ppa/debian experimental main to /etc/apt/sources.list
    • Issue sudo apt-get update && apt-get sudo install python-springpython to refresh the sources list and install Spring Python
    • Note there’s ‘debian’ in the name but I’ve had no problems with using the DEB on Ubuntu 10.04

A word on the project’s dependencies. The commands above will install Spring Python but it still doesn’t mean you’ll be able to make use of each and every piece of functionality. The installation methods mentioned above haven’t been (yet) broken into smaller ones, each of which could express its own concrete dependencies and on the other hand, adding a huge list of mandatory dependencies would clearly be an overkill, after all, not every project needs to access XML, Yaml, Oracle, Postgres, JMS WebSphere MQ, Pyro, Hessian, CherryPy and other external resources at the same time :-) So, once you install Spring Python, you still need to check the documentation for a list of things to install before you can start using a given Spring Python’s feature. Each chapter has a section devoted to listing all the dependencies or stating that a stock Python distribution will do, see for instance Security, AOP, IoC, JMS and Remoting.

I hope it sheds some light on the matter, in case you need any help, be sure to drop in the forum, mailing list or the IRC channel (#springpython on Freenode network). See you!

@fourthrealm

Share

Can you tell the difference?

December 13th, 2010 Comments off

So I’ve stumbled upon the Prince of Persia movie poster and spent some time marvelling at it. I haven’t seen the movie but the poster sprang to mind the many hours I spent with the game back then, some twenty years ago. I don’t remember exactly when it was but I do remember that Mach 3, Digger and Prince of Persia where at that time the only sane PC games, the alternatives to a splendid array of games I could play on my Atari 65 XE – and that should tell you that the PC game industry was at its very infancy to say the least.

I didn’t have have a color PC monitor at that time but could’ve sworn the prince in question was dressed in white and was a blond. The lady he was to rescue wasn’t a blond but they both still looked pretty much like a typical-stereotypical pair from One Thousand and One Night, or I should say, as the book used to be illustrated in Central Europe at that time which basically meant light- or brightly-colored and comfortable yet always modest clothes. So when I saw that 20 years later our prince is all in black, the lady’s dressed in darker clothing too and he has an appropriate 3-day beard, I instantly recalled yet another thing from my childhood, a Robin Hood book I used to read.

Here’s the cover of a Robin Hood book published in the year 1979

Robin Hood book cover from 1979

And here is Robin Hood in 2010

Robin Hood movie poster from 2010

That’s the movie poster I saw earlier this year. I hear other countries were more “lucky” and people actually were given a chance of seeing someone aiming a bow instead of sporting a damn hammer but that’s how I was greeted by the last incarnation of the legend.

So what’s changed in the 30 years of hard life in the forest?

Well, the first thing is, there’s no forest anymore. Whereas the first guy clearly has something to do with living in woods, the latter one has come out of the shadow and he’s now riding a horse. Not any horse mind you, he’s light gray, no doubt one of mearas and I bet Gandalf himself wouldn’t be ashamed to ride him. On the other hand, there’s something very darksome about the horse. I don’t know what it is, maybe it’s the deep black eyes, maybe it’s the contrast between the leather harness and the horse’s gray coat? Or maybe it’s the riveted harness itself? What do you think? And where did Robin keep the horse?

What about Robin? I don’t know about you but the first difference I saw was a subtle smile on the guy’s face 30 years ago and a roar he’s giving out now. So much for someone who was supposed to be clever and cunning, clearly current situation calls for spreading shock and terror instead of using shrewdness and wisdom. Robin Hood of today is anything but merry, and it’s only exacerbated by a thing unthinkable back then, that he has blood on his face.

On the other hand, neither the old picture nor the newer one sport Lincolne Greene, but at least the gentleman from the ’70s doesn’t have a lamellar armour. Can you imagine how tremendously must it improve his swiftness? And his head, back then a hat with a feather was a must, today a naked head will defeat any shield in a mighty charge so why bother with a hat? Not to mention the feather!

As for weapons there’s hardly more I can say, a bow and quiver has been replaced by a hammer. Obviously for crushing orcs and goblins bred in thousands in lairs under Nottingham. To be completely fair I need to admit the old one has a sword but at least he has the grace to keep in the sheath instead of brandishing it before my eyes.

If I’m really to be just I cannot conceal the mustache which we see on the older picture, but hey, that was 30 years ago and everyone has their style, OK? What compensates for it now is a fashionable 3-day beard, the same one that made me recall the story of Robin when I saw the Prince of Persia movie poster.

I’m nearing towards end and the last thing I’ll mention is what we can be seen on the horizon. Years ago it was Nottingham and today it’s a battlefield. But not an ordinary one, oh no, it’s a battlefield with flapping banners. Banners of whom, may I ask? The Mighty Legion of Sherwood Outlaws?  That’s a very long way from robbing the rich and giving to poor to marching under an own banner. Or maybe it’s of the sheriff’s forces? The Orcs Auxiliary Regiment’s perhaps?

So there you have it, a brute instead of a gentleman, a barbarian instead of a folk hero. These were the differences I was able to spot and how about you? Can you see anything more?

@fourthrealm

Share
Categories: Non-Software Tags:

PyMQI 1.2 is coming soon

December 3rd, 2010 Comments off

To all Python & WebSphere MQ hackers out there – I think I’ll be releasing PyMQI 1.2 in a month or so – the biggest features include support for MQRFH2 headers and byte strings in PCF/MQAI calls.

MQRFH2 headers, a feature implemented by Hannes Wagener, should be of interest to anyone working with WebSphere Message Broker or Java JMS applications while byte strings make a whole new class of PCF calls available to Python code, think of things such as issuing MQCMD_INQUIRE_CONNECTION commands.

Other things worth mentioning are new structures – MQTM/ MQTMC2 (also by Hannes) and making the API more PEP-8 compliant while retaining backward compatibility of course – I know of people who have been running PyMQI applications basically unattended since Python 2.3 so making sure it doesn’t break now is a must.

If you have any particular needs that haven’t been covered in the tracker yet, please open a ticket and let me know about it. If you’d like to see more usage examples, don’t hesitate to contact me directly or through Launchpad. Thanks!

@fourthrealm

Share
Categories: Software Tags: , ,