示例#1
0
    def __init__(self, username, password, save_dir=None):
        Webserver.__init__(self, HOST_NAME, PORT_NUMBER)
        MZBot.__init__(self, MZQ_URL)

        self.sh = snaphax.Snaphax()
        self.username = username
        self.password = password
        self.save_dir = save_dir
示例#2
0
文件: nlp.py 项目: kandouss/musicazoo
	def __init__(self):
		Webserver.__init__(self,HOST_NAME,PORT_NUMBER)
		MZBot.__init__(self,MZQ_URL)
示例#3
0
 def __init__(self):
     Webserver.__init__(self, HOST_NAME, PORT_NUMBER)
     MZBot.__init__(self, MZQ_URL)
示例#4
0
 def __init__(self, url):
     self.luid = None
     self.db = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                            'mz.db')
     MZBot.__init__(self, url)
示例#5
0
文件: raw.py 项目: cmerrill/musicazoo
#!/usr/bin/python

from musicazoo.lib.mzbot import MZBot
import sys
import json
import readline

if len(sys.argv)>1:
	q=sys.argv[1]
else:
	q='http://localhost:9000'

m=MZBot(q)

while True:
	inp_str=raw_input("> ")
	try:
		inp_json=json.loads(inp_str)
	except ValueError as e:
		print "Bad json:",e
		continue

	try:
		if isinstance(inp_json,dict):
			out_json=m.doCommand(inp_json)
		elif isinstance(inp_json,list):
			out_json=m.doCommands(inp_json)
		else:
			print "Error, please specify a dict or list"
			continue
示例#6
0
 def __init__(self,url):
     self.uid = None
     self.btn = USButton('/dev/input/by-id/usb-Eric_USB_Button-event-if00')
     self.btn.callback = lambda x: self.btn_press(x)
     MZBot.__init__(self,url)
示例#7
0
文件: raw.py 项目: sqshemet/musicazoo
#!/usr/bin/python

from musicazoo.lib.mzbot import MZBot
import sys
import json
import readline

if len(sys.argv) > 1:
    q = sys.argv[1]
else:
    q = 'http://localhost:9000'

m = MZBot(q)

while True:
    inp_str = raw_input("> ")
    try:
        inp_json = json.loads(inp_str)
    except ValueError as e:
        print "Bad json:", e
        continue

    try:
        if isinstance(inp_json, dict):
            out_json = m.doCommand(inp_json)
        elif isinstance(inp_json, list):
            out_json = m.doCommands(inp_json)
        else:
            print "Error, please specify a dict or list"
            continue
示例#8
0
 def __init__(self, url):
     self.uid = None
     self.btn = USButton('/dev/input/by-id/usb-Eric_USB_Button-event-if00')
     self.btn.callback = lambda x: self.btn_press(x)
     MZBot.__init__(self, url)
示例#9
0
	def __init__(self,url):
		self.luid=None
		self.db=os.path.join(os.path.dirname(os.path.realpath(__file__)),'mz.db')
		MZBot.__init__(self,url)