#!/usr/bin/python3
try:
    import brlapi
    import time
finally:
    print("test")



def brl_rt():
    """this fonction put the time on the braille display"""
    try:
        b = brlapi.Connection()
        b.enterTtyMode()
        while 1:
            tmp = time.localtime()
            y = str(tmp.tm_hour)+':'+str(tmp.tm_min)+':'+str(tmp.tm_sec)
            b.writeText(y)
            if b.readKey(False) == 65293:
                break
    finally:
        return 0

brl_rt()
