GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Dragonfire-RaspberryPi/api.py at master · DragonComputer/Dragonfire-RaspberryPi

Expand file tree

/

api.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
31 lines (30 loc) · 952 Bytes
/

api.py

Copy path

File metadata and controls

executable file
·
31 lines (30 loc) · 952 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.