GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Dragonfire-RaspberryPi/api.py at master · DragonComputer/Dragonfire-RaspberryPi Expand file tree/ Copy pathapi.pyMore file actions executable file ·31 lines (30 loc) · 952 Bytes / Copy pathapi.pyFile metadata and controlsexecutable file ·31 lines (30 loc) · 952 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #!/usr/bin/python import subprocess import time import os songRunning = False class Data: def __init__(self, com="", msg="", sp="False"): self.command = com self.message = msg self.speak = sp def interact(self,duration): #subprocess.Popen(["notify-send","Dragonfire", self.message]) os.system("xbmc-send --action=\"Notification(\"Dragonfire\"," + self.message + ")\"") if self.command != "": time.sleep(duration) subprocess.Popen(self.command,stdout=subprocess.PIPE) #if self.speak == True: # self.say(self.message) #else: def say(self,message): #if songRunning == True: # subprocess.Popen(["rhythmbox-client","--pause"]) proc = subprocess.Popen(["festival","--tts"],stdin=subprocess.PIPE) proc.stdin.write(message) proc.stdin.close() #proc.wait() #if songRunning == True: # subprocess.Popen(["rhythmbox-client","--play"]) def espeak(self,message): subprocess.Popen(["espeak","-v","en-uk-north",message]) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |