def instance(): import sys try: import dbus return NotifyDbus() except ImportError: sys.stderr.write("python-dbus not installed. try:" "`sudo pip install python-dbus`.") if whereis_exe('notify-send'): return NotifySendNotification() sys.stderr.write("notify-send not found.") return Notification()
def instance(): import sys if whereis_exe('open'): return MacOSXEmail() sys.stderr.write("open not found.") return Email()
def instance(): import sys if whereis_exe('lshw'): return LinuxUniqueID() sys.stderr.write("lshw not found.") return UniqueID()
def instance(): if whereis_exe('say'): return NativeSayTextToSpeech() elif whereis_exe('espeak'): return EspeakTextToSpeech() return TTS()
def instance(): if whereis_exe('espeak.exe'): return EspeakTextToSpeech() return TTS()
def instance(): import sys if whereis_exe('ioreg'): return OSXBattery() sys.stderr.write("ioreg not found.") return Battery()
def instance(): import sys if whereis_exe('upower'): return LinuxBattery() sys.stderr.write("upower not found.") return Battery()
def instance(): import sys if whereis_exe('xdg-open'): return LinuxEmail() sys.stderr.write("xdg-open not found.") return Email()
def instance(): if whereis_exe('espeak'): return EspeakTextToSpeech() elif whereis_exe('flite'): return FlitetextToSpeech() return TTS()
def instance(): import sys if whereis_exe('ioreg'): return OSXUniqueID() sys.stderr.write("ioreg not found.") return UniqueID()
def instance(): if whereis_exe('xrandr'): return XrandrOrientation() else: