Ejemplo n.º 1
0
 def execute(self, command, append=False, copy=False):
     l = self.l
     if not append:
         l[:] = []
     if copy:
         l = list(l)
     execute(command, output=l.extend)
     return l
Ejemplo n.º 2
0
def about_cb(widget, data = None):
    try:
        from zicbee import __version__ as zdb_v
    except ImportError:
        zdb_v = "n/a"
    from zicbee_lib import __version__ as lib_v

    try:
        result = []
        execute("infos", output=result.append)
        song = '\n'.join(result[0])
        gtk.STOCK_NETWORK

    except Exception, e:
        print e
        song = 'Unable to get song informations'
Ejemplo n.º 3
0
 def onecmd(self, line):
     try:
         cmd, arg, line = self.parseline(line)
         if not line:
             return self.emptyline()
         if cmd is None:
             return self.default(line)
         self.lastcmd = line
         if cmd == '':
             ret = self.default(line)
         else:
             ret = execute(cmd, arg)
     except Exception, e:
         print "Err: %s"%e
         DEBUG()
Ejemplo n.º 4
0
def pause_cb(widget, data=None):
    execute("pause")
Ejemplo n.º 5
0
def prev_cb(widget, data=None):
    execute("prev")
Ejemplo n.º 6
0
def next_cb(widget, data=None):
    execute("next")
Ejemplo n.º 7
0
def play_cb(widget, data = None):
    execute('play')