view stampit/utils.py @ 5:3f9fac577d75

this now actually makes some tarballs for you
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 20 Apr 2010 14:51:47 -0700
parents 6ef0e769248d
children
line wrap: on
line source

"""
utility functions
"""

import os

def which(executable):
  for directory in os.environ['PATH'].split(os.pathsep):
    path = os.path.join(directory, executable)
    if os.path.exists(path):
      return path