Oh, wait. Here, I found it: --- #! /usr/bin/python import os import string print os.path.dirname(string.split(`os`, "'")[3]) --- I tested it under 1.5.2. Does it also work under 2.x? -- Ignacio Vazquez-Abrams <ignacio at openservices.net>