Example #1
0
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
Example #2
0
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.
Example #3
0
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))
Example #4
0
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.