Example #1
0
    def prompt(self, selectedOption):
        self.voiceOutput('You have selected: ' + selectedOption + '. Is it correct?')

        isCorrect = keylogger.getkey()
        print isCorrect
        if isCorrect == 'y':
            return True
        else:
            return False
Example #2
0
    def prompt(self, selectedOption):
        self.voiceOutput('You have selected: ' + selectedOption +
                         '. Is it correct?')

        isCorrect = keylogger.getkey()
        print isCorrect
        if isCorrect == 'y':
            return True
        else:
            return False
Example #3
0
#!/usr/bin/python

from voice import Voice
import keylogger
from fs import FS

v = Voice()
""" Mounting output to file system """
fs = FS(v.voiceOutput)

selectedItem = ''
""" Main loop """
while True:
    key = keylogger.getkey()

    if key == 'l':
        """ ls """
        fs.getOutput()(fs.scanDir())
    elif key == 'p':
        """ pwd """
        fs.getOutput()(fs.currentDir)
    elif key == 'n':
        """ cd """
        v.voiceOutput('Select folder to navigate')
        folder = v.selectFrom(['..'] + fs.scanDir(True))
        if folder:
            fs.navigate(folder)
    elif key == 'm':
        """ mkdir """
        while True:
            v.voiceOutput("Enter name for new folder")