[Merwok] use os.pathsep to know the PATH environment separator

This commit is contained in:
Yann Leboulanger 2008-02-17 16:01:44 +00:00
parent 13541c0425
commit 19e594f919
1 changed files with 1 additions and 1 deletions

View File

@ -382,7 +382,7 @@ def is_in_path(name_of_command, return_abs_path = False):
# on failures False is returned
is_in_dir = False
found_in_which_dir = None
path = os.getenv('PATH').split(':')
path = os.getenv('PATH').split(os.pathsep)
for path_to_directory in path:
try:
contents = os.listdir(path_to_directory)