[Merwok] use os.pathsep to know the PATH environment separator
This commit is contained in:
parent
13541c0425
commit
19e594f919
1 changed files with 1 additions and 1 deletions
|
@ -382,7 +382,7 @@ def is_in_path(name_of_command, return_abs_path = False):
|
||||||
# on failures False is returned
|
# on failures False is returned
|
||||||
is_in_dir = False
|
is_in_dir = False
|
||||||
found_in_which_dir = None
|
found_in_which_dir = None
|
||||||
path = os.getenv('PATH').split(':')
|
path = os.getenv('PATH').split(os.pathsep)
|
||||||
for path_to_directory in path:
|
for path_to_directory in path:
|
||||||
try:
|
try:
|
||||||
contents = os.listdir(path_to_directory)
|
contents = os.listdir(path_to_directory)
|
||||||
|
|
Loading…
Add table
Reference in a new issue