def open_braille(filename):
    file = open(filename)
    content = file.read()
    print(brailleToAlpha.translate(content))
    with open(filename.replace('.txt','') + '_converted_to_text.txt', 'w') as converted_file:
        converted_file.write(brailleToAlpha.translate(content))
        converted_file.close()
示例#2
0
def open_braille(filename):
    file = open(filename)
    content = file.read()
    print(brailleToAlpha.translate(content))
示例#3
0
def user_braille():
    print("Input Braille: ", end="")
    print(brailleToAlpha.translate(input()))
def braille_text(inp):
    print(brailleToAlpha.translate(inp))
示例#5
0
cols = 2

scanDelay = 0.1

braille2matrix = {}
for i in range(len(brailles)):
    braille2matrix[brailles[i]] = matrixcodes[i]

textEng = "1 2 3 Hello How are you"
textbraille = alphaToBraille.translate(textEng)

textBraille = "          "
#print(len(textEng))
#print(len(textbraille))
textBraille = textbraille[:min(len(textbraille), chars)]
textEng = brailleToAlpha.translate(textBraille)
print(textBraille)
print(textEng)

widthWin = 700
heightWin = 140
win = GraphWin("eBraille Display", widthWin, heightWin)
win.setBackground("white")
textMessage = Text(Point(widthWin / 2, l1), textEng)
textMessage.setTextColor("black")
textMessage.setFace("courier")
textMessage.draw(win)
messageLED = textBraille
textMessage = Text(Point(widthWin / 2, l2), messageLED)
textMessage.setSize(20)
textMessage.draw(win)
def open_braille(filename):
    #file = open(filename)
    #content = file.read()
    oi = brailleToAlpha.translate(filename)