def getSubuserCommandPath(command): builtInCommandPath = os.path.join(paths.getSubuserCommandsDir(),command) if os.path.exists(builtInCommandPath): return builtInCommandPath else: externalCommandPath = executablePath.which("subuser-"+command) return externalCommandPath
def getBuiltInSubuserCommands(): """ Get a list of the names of the built in subuser commands. """ apparentCommandsSet = set(os.listdir(paths.getSubuserCommandsDir())) commands = list(apparentCommandsSet.difference(nonCommands)) return [command[:-3] for command in commands] #remove the .py suffixes.
def getBuiltInSubuserCommands(): """ Get a list of the names of the built in subuser commands. """ apparentCommandsSet = set( os.listdir(paths.getSubuserCommandsDir())) return list(apparentCommandsSet.difference(nonCommands))
def getBuiltInSubuserCommands(): """ Get a list of the names of the built in subuser commands. """ apparentCommandsSet = set( os.listdir(paths.getSubuserCommandsDir())) commands = list(apparentCommandsSet.difference(nonCommands)) return [command[:-3] for command in commands] #remove the .py suffixes.