コード例 #1
0
ファイル: main.py プロジェクト: ievans/SimmonsLED
def whitelist(text):
    cleaned = ''
    for c in text:
        #prevent XSS just in case <> is added to LED characters. DO NOT REMOVE.
        if c in LEDCharacters.allowedChars() and c != '>' and c != '<':
            cleaned += c
    return cleaned
コード例 #2
0
ファイル: main.py プロジェクト: ievans/SimmonsLED
def whitelist(text):
    cleaned = ''
    for c in text:
        #prevent XSS just in case <> is added to LED characters. DO NOT REMOVE.
        if c in LEDCharacters.allowedChars() and c != '>' and c != '<':
            cleaned += c
    return cleaned
コード例 #3
0
ファイル: Matrix.py プロジェクト: ievans/SimmonsLED
def test():
    allowedChars = LEDCharacters.allowedChars()
    test = MatrixScroller(allowedChars, 6, 6)
    for i in range(len(allowedChars)*10):
        test.next()
    print 'all tests OK'
    test = MatrixScroller('A', 6, 6)
    msr = MatrixScrollRepeater(2, test)
    for i in range(20):
        msr.next()
        print msr.getMatrix()

    test = MatrixScroller('....', 6, 6)
    test.next()
    test.next()
    test.next()
    test.next()
    test.next()
    print test #.getArduinoMatrix()
    print test.getArduinoList()