Determine whether a command can be run or not :param list[str] individual_files: :rtype: str
(executable_cmd)
| 28 | |
| 29 | |
| 30 | def is_installed(executable_cmd): |
| 31 | """ |
| 32 | Determine whether a command can be run or not |
| 33 | |
| 34 | :param list[str] individual_files: |
| 35 | :rtype: str |
| 36 | """ |
| 37 | for path in os.environ["PATH"].split(os.pathsep): |
| 38 | path = path.strip('"') |
| 39 | exe_file = os.path.join(path, executable_cmd) |
| 40 | if os.path.isfile(exe_file) and os.access(exe_file, os.X_OK): |
| 41 | return True |
| 42 | return False |
| 43 | |
| 44 | |
| 45 | def djoin(*tup): |
no outgoing calls
no test coverage detected