コード例 #1
0
ファイル: digital.py プロジェクト: MaxShepovalov/pyproject
def help():
    out += 'Digital devices\n'
    out += '    giveNames() - returns types of known devices\n'
    out += '    printNames() - print types of known devices\n'
    out += '    process(dtype, input set, output set) - simulate chip\n'
    out += '    giveLogic(dtype) - shows help for given device type\n'
    out += '\n'
    notify.say(out)
コード例 #2
0
def help():
    out = ''
    out += 'Wire module. Connects devices\n'
    out += '    giveNames() - returnes wires\' names \n'
    out += '    printNames() - prints wires\' names\n'
    out += '    giveReport(name) - returns data for one wire\n'
    out += '    printReport() - prints data for wires\n'
    out += '    readV(name) - returns value of a wire\n'
    out += '    setV(name, value) - set values for wire\n'
    out += '                value is a list \n'
    out += '    setBinary(name, value) - \n'
    out += '                value can be an int (will be converted to binary)\n'
    out += '                value can be a binary string, 1 - high, else - low\n'
    out += '    connect(wire name, device name) - adds listener\n'
    out += '    addBus(name, size) - adds new bus with given size\n'
    notify.say(out)
コード例 #3
0
ファイル: main.py プロジェクト: Everlands/automation
def say():
    return notify.say(flask.request.args)
コード例 #4
0
ファイル: core.py プロジェクト: j-waters/Home-Manager
def wakeup_time_say():
    say("you need to wakeup for {}".format(
        events.wakeup_time().strftime("%-I:%M %P")))
    return wakeup_time()
コード例 #5
0
ファイル: core.py プロジェクト: j-waters/Home-Manager
def first_event_say():
    say("your first event tomorrow is at {}".format(
        events.first_event_time().strftime("%-I:%M %P")))
    return first_event()
コード例 #6
0
ファイル: digital.py プロジェクト: MaxShepovalov/pyproject
def printNames():
    out = 'digital:\n'
    for k in logic.keys():
        out += '    ' + k + '\n'
    notify.say(out)
コード例 #7
0
ファイル: digital.py プロジェクト: MaxShepovalov/pyproject
def giveLogic(dtype):
    notify.say(logic[dtype]['help'])
コード例 #8
0
def addTask(command, target):
    task.append((command, target))
    if GLOB.notify_new_task:
        notify.say('INFO new task: \'' + str(command) + '\' on \'' +
                   str(target) + '\'')
コード例 #9
0
def printReport():
    out = 'wires:\n'
    for w in bus.keys():
        out += giveReport(w, full=False)
    notify.say(out)
コード例 #10
0
def printNames():
    out = 'wires:\n'
    for w in bus.keys():
        out += w + '\n'
    notify.say(out)