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
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
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()