view stampit/utils.py @ 3:6ef0e769248d

add initial workflow
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 20 Apr 2010 14:12:15 -0700
parents
children 3f9fac577d75
line wrap: on
line source

"""
utility functions
"""

import os

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