projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
event: remove unused hook
[bertos.git]
/
wizard
/
bertos_utils.py
diff --git
a/wizard/bertos_utils.py
b/wizard/bertos_utils.py
index f0d5494469e33955d203ba5d937a1c87bbfbe201..204c4fe4ea1e602f9f61ecbaf5756451dee36b88 100644
(file)
--- a/
wizard/bertos_utils.py
+++ b/
wizard/bertos_utils.py
@@
-340,12
+340,17
@@
def replaceSeparators(path):
def getSystemPath():
path = os.environ["PATH"]
def getSystemPath():
path = os.environ["PATH"]
- if os.name == "nt":
- path = path.split(";")
- else:
- path = path.split(":")
+ path = path.split(os.pathsep)
return path
return path
+def findInPath(file, path=None):
+ if path is None:
+ path = os.environ.get('PATH', '')
+ if type(path) is type(''):
+ path = path.split(os.pathsep)
+ return filter(os.path.exists, map(lambda dir, file=file: os.path.join(dir, file), path))
+
+
def findToolchains(path_list):
toolchains = []
for element in path_list:
def findToolchains(path_list):
toolchains = []
for element in path_list: