Hi Samuel,

When I run the below script, I am expecting to see the word "hello"
displayed on the  display. That does not happen.

The output that I get on my console is:
brl_test.py

[pranav@archlinux ~]$ python brl_test.py

Server version 8

Display size [40, 1]

[

The display however is clear.

I am running the script over a ssh connection.
import brlapi

import errno

import Xlib.keysymdef.miscellany
import time
try:
        b = brlapi.Connection()
        b.enterTtyModeWithPath("")
        print("Server version " +
str(b.getParameter(brlapi.PARAM_SERVER_VERSION, 0, brlapi.PARAMF_GLOBAL)))

        print("Display size " +
str(b.getParameter(brlapi.PARAM_DISPLAY_SIZE, 0, brlapi.PARAMF_GLOBAL)))

        b.writeText("hello")
        time.sleep(20)
        b.leaveTtyMode()
        b.closeConnection()
except Exception as e:
        print("error")
        print(e)

-----Original Message-----
From: BRLTTY <[email protected]> On Behalf Of Samuel Thibault
Sent: Monday, May 12, 2025 3:14 AM
To: Informal discussion between users and developers of BRLTTY.
<[email protected]>
Subject: Re: [BRLTTY] Revisiting outputting braille from my python script

Hello,

Pranav Lal, le dim. 11 mai 2025 08:32:09 +0530, a ecrit:
> I want my python program to output to my focus 40 5th generation 
> braille display.
> 
[...]
> How do I output progress messages from the script to the braille 
> display using brltty?

To override any kind of focus tracking you can take the whole control of the
display with b.enterTtyModeWithPath() instead of b.enterTtyMode().

Samuel
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected] For general
information, go to: http://brltty.app/mailman/listinfo/brltty

_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to