Ejemplo n.º 1
0
def main():
    # Strip path
    command = os.path.basename(sys.argv[0])
    if command[-3:] == '.py':
        # Strip '.py' extension
        command = command[0:len(command)-3]
    execute(command, commands)
Ejemplo n.º 2
0
def main():
    try:
        command = sys.argv[1]
    except IndexError:
        raise Exception("Missing 'command' argument to %s" % sys.argv[0])
    execute(command, commands)