Python to the stars

I re-engineered my Dalriada StarViewer program from Java to Python, mainly as a Python learning exercise.  The result is much more succinct than the Java source code, but terminating blocks with outdents takes some getting used to!  WYDSIWYN – What You Don’t See Is What You Need.

I also needed PyGTK for the GUI, which constrained me to python2 I think.  It seems PyGTK is not available for python3.  I was going to skip python2 and start learning at python3 but I have changed my mind.  I will learn python2 and leave python3 to the ‘early adopters’.

And I needed a postgresql driver of course, although the server is already installed on RPi, and its populated StarDb database – to support the Java program.  I settled on psycopg and installed it on my arch linux RPi with pacman -Sy python-psycopg2 .

Actually, I admit that I did the python development with PyDev in Eclipse under Debian on my regular AMD64 desktop PC, but it was easy enough to export the source scripts to RPi – where I could probably have done the whole thing in Geany or similar.

Anyway, I had good fun and I learned a lot.  I like python and I’m looking forward to using it from scratch for my next serious program development.


raspbian née debian

I have struggled with debian on RPi so when raspbian was finally released I was relieved, and hopeful. So I burned the new raspbian image over the debian image on my spare 8GB SD card and tried to port my RPi WordPress blog from Arch Linux to raspbian. I succeeded in the end – but oh so slowly. The title of the home page might be all that distinguishes them. Watch out for dalriada pi on raspbian or dalriada pi on arch linux. I’ll try raspbian for a bit longer, but at present I prefer arch linux.

The image below shows the pi user’s first desktop.

Next desktop is my own, after I had wallpapered it in its own image:


Python tracks

Inspired by a helpful reply by jmacey in the  Raspberry Pi forum I checked out python-turtle-demo .  It installs quite easily on RPi and rapidly gives access to 50+ demo applications of the turtle module of Python intended as examples for using Python and turtlegraphics in an educational setting.

As it says on the home page this will go far beyond what is known as classical turtle graphics and I certainly haven’t go to grips with it all yet.  But it would probably be a good segue from pure turtle to python OOP.

And I need an incentive to learn python ( though probably via PyDev in Eclipse on my main PC ! RPi hasn’t enough hamsters for that.)