Mercurial > hg > config
changeset 367:77e7cab3e9f2
modularize
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 20 Jul 2013 11:37:39 -0700 |
parents | ace6c399fcb1 |
children | 6f1e4562c06a |
files | python/lsex.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/python/lsex.py Tue Jul 16 15:24:46 2013 -0700 +++ b/python/lsex.py Sat Jul 20 11:37:39 2013 -0700 @@ -16,13 +16,17 @@ def lsex(path=None): """ - list executable files on the path - - path: list of directories to search. if not specified, use system path + list of executable files on the path + + - path: list or PATH-style string of directories to search. + if not specified, use system PATH """ if path is None: # use system path - path = ordered_set(os.environ['PATH'].split(':')) + path = os.environ['PATH'] + if isinstance(path, basestring): + path = ordered_set(path.split(os.pathsep)) executables = []