File: continue.py

package info (click to toggle)
mc-foo 0.0.13
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 268 kB
  • ctags: 532
  • sloc: python: 1,967; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 638 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""send a continue paused song command to dj"""

import McFoo.client
import sys, os.path
from twisted.internet import reactor
from twisted.python import usage

class Options(usage.Options):
    synopsis = "Usage: %s [options] continue" % os.path.basename(sys.argv[0])

    def __init__(self):
        usage.Options.__init__(self)

    def postOptions(self):
        c = McFooClientContinue()
        c()

class McFooClientContinue(McFoo.client.McFooClientSimple):
    def handle_login(self, perspective):
        McFoo.client.McFooClientSimple.handle_login(self, perspective)
        self.remote.callRemote("cont").addCallback(self.stop)