Mercurial > hg > stampit
comparison 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 |
comparison
equal
deleted
inserted
replaced
4:95b9f262d795 | 5:3f9fac577d75 |
---|---|
2 utility functions | 2 utility functions |
3 """ | 3 """ |
4 | 4 |
5 import os | 5 import os |
6 | 6 |
7 def which(exectuable): | 7 def which(executable): |
8 for directory in os.environ['PATH'].split(os.pathsep): | 8 for directory in os.environ['PATH'].split(os.pathsep): |
9 path = os.path.join(dir, executable) | 9 path = os.path.join(directory, executable) |
10 if os.path.exists(path): | 10 if os.path.exists(path): |
11 return path | 11 return path |
12 | 12 |
13 | 13 |