예제 #1
0
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()
예제 #2
0
def instance():
    import sys
    if whereis_exe('open'):
        return MacOSXEmail()
    sys.stderr.write("open not found.")
    return Email()
예제 #3
0
def instance():
    import sys
    if whereis_exe('lshw'):
        return LinuxUniqueID()
    sys.stderr.write("lshw not found.")
    return UniqueID()
예제 #4
0
파일: tts.py 프로젝트: bhaveshAn/crisscross
def instance():
    if whereis_exe('say'):
        return NativeSayTextToSpeech()
    elif whereis_exe('espeak'):
        return EspeakTextToSpeech()
    return TTS()
예제 #5
0
def instance():
    if whereis_exe('espeak.exe'):
        return EspeakTextToSpeech()
    return TTS()
예제 #6
0
def instance():
    import sys
    if whereis_exe('ioreg'):
        return OSXBattery()
    sys.stderr.write("ioreg not found.")
    return Battery()
예제 #7
0
def instance():
    import sys
    if whereis_exe('upower'):
        return LinuxBattery()
    sys.stderr.write("upower not found.")
    return Battery()
예제 #8
0
def instance():
    import sys
    if whereis_exe('xdg-open'):
        return LinuxEmail()
    sys.stderr.write("xdg-open not found.")
    return Email()
예제 #9
0
def instance():
    if whereis_exe('espeak'):
        return EspeakTextToSpeech()
    elif whereis_exe('flite'):
        return FlitetextToSpeech()
    return TTS()
예제 #10
0
def instance():
    import sys
    if whereis_exe('ioreg'):
        return OSXUniqueID()
    sys.stderr.write("ioreg not found.")
    return UniqueID()
예제 #11
0
def instance():
    if whereis_exe('xrandr'):
        return XrandrOrientation()
    else: