def pid(app):
    app.check()
    if not os.path.exists(app.pid_path()):
        print "~ Oops! %s is not started (server.pid not found)" % os.path.normpath(app.path)
        print "~"
        sys.exit(-1)
    pid = open(app.pid_path()).readline().strip()
    print "~ PID of the running applications is %s" % pid
    print "~ "
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/framework/pym/play/commands/daemon.py/pid/original