Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/a/d/AdminCraft-HEAD/admincraft/views.py   AdminCraft(Download)
    #Check status value and run /etc/init.d/minecraft command to restart/start/stop/backup.
    if keyword == "restart":
        subprocess.Popen(config.MINECRAFTDAEMON + ' restart', shell=True)
        return 'Restarting Minecraft Server...'
    elif keyword == "start":
        subprocess.Popen(config.MINECRAFTDAEMON + ' start', shell=True)
        return 'Starting Minecraft Server...'
    elif keyword == "stop":
        subprocess.Popen(config.MINECRAFTDAEMON + ' stop', shell=True)
        return 'Stopping Minecraft Server...'
    elif keyword == "backup":
        subprocess.Popen(config.MINECRAFTDAEMON + ' backup', shell=True)
        return 'Backing up Minecraft Server...'
 
 
    #Initiate full command via Popen. Return "Sending Command..."
    commandProc = config.MINECRAFTDAEMON + ' command "' + consoleOperator + command + '"'
    subprocess.Popen(commandProc, shell=True)
    print commandProc