Archives for the ‘Programming’ Category
Wednesday, 27 August 2008
OpenStreetMap is like Wikipedia, but for mapping. The project depends on users that create maps — more info here.
But how does the layman create an accurate map? With GPS this is easier than you might think. All you need to do is record a GPS track and upload it. Then simply draw lines for the [...]
Tags: gps
Posted in Life, Programming | No Comments »
Saturday, 23 August 2008
It’s a mystery to me why OpenOffice Base in version 2.4 does not support SQLite out of the box. How much more basic than SQLite can you get regarding a simple database back end (except plain text maybe)!?
Well this is how I got it working, based on this wiki:
apt-get install unixodbc unixodbc-dev libsqlite3 libsqlite3-dev unixodbc-bin
You [...]
Tags: odbc, openoffice, sqlite
Posted in Programming | 3 Comments »
Tuesday, 5 August 2008
The module to access an Oracle database with Python is cx_Oracle. This works for all versions from 8i to 11g. To compile you need to have Oracle libraries, but luckily you do not need the full installation — the “instant client” with OCI is enough. (Thanks for pointing that out in this article.)
When using the [...]
Tags: oracle, Python
Posted in Programming, Python, Work | 1 Comment »
Saturday, 2 August 2008
Most knew from the start that last.fm was destined for greatness and even tough they sold out to CBS recently I have to point out that greatness now.
Usually I listen to music through mpd running on my file server. I control it using mmpc (a gmpc port/fork) on my Nokia 770 or sonata, gmpc or [...]
Tags: last.fm, mpd, Music
Posted in Interweb, Life, Music, Python | 1 Comment »
Sunday, 3 June 2007
I wrote this tiny GUI for ExifTool in C# with .net. Drag’n’drop a source picture on the left and a target picture on the right. When clicking “copy” all EXIF information is copied from the left to the right — very useful after creating panoramas with hugin to still have somewhat correct information about the [...]
Tags: .net, exif, gui
Posted in Programming | Comments Off
Monday, 23 April 2007
I need to find a file that is hidden somewhere in a directory tree. So I search for it recursively. On UNIX the “find” command works just fine for this, but I wanted a Python native solution and finally came up with both:
import os
def findFile(name, directory):
“”"
[...]
Tags: Python
Posted in Programming, Python | No Comments »
Thursday, 19 April 2007
I have to create a list of numbers from a string in a configuration file that looks about like this:
132,120-130,135,139
Since users sometimes add blanks in configurations files just to make them look nicer this should also work with a string like this:
132, 120 – 130 , 135,139
The resulting list should be sorted and contain only [...]
Tags: Python
Posted in Programming, Python | No Comments »
Wednesday, 18 April 2007
I use the application name and “ps” to find the process’ pid (all of them if there are more processes called name). If no pid is found there no instance of the application running.
import os
def getpid(name):
“”"
checks if a process with the given name [...]
Tags: Python
Posted in Programming, Python | No Comments »
Saturday, 11 November 2006
This version adds the “–here” command line switch to paste a file to the current directory. This was working before too when you configured an empty string as your default output directory. However now you can paste “here” _and_ if you want to, to your default directory by simply running p2f.exe without any switch. The [...]
Posted in Programming | No Comments »
Sunday, 22 October 2006
Finally I took the time to finish this up. You can download it here.
Instead of annoying message boxes balloons notify you of anything that happens and if that is still too much information, they can be disabled in the new options dialog. Also the context menu entry can now be created or deleted with a [...]
Posted in Programming | No Comments »