[BRLTTY] BRLTTY and the latex-access project by means of python brlapi module

Daniel Dalton d.dalton at iinet.net.au
Fri Dec 2 19:51:18 EST 2011


On Fri, Dec 02, 2011 at 11:52:51AM -0500, Dave Mielke wrote:
> You'd call it something like nemeth.ctb (brltty uses the .ctb extension for 
> contraction tables) and put it in /etc/brltty/. Ultimately, of course, we'd 

OK

> include the script as part of the brltty distribution.

Sure

> 
> You'd also have to ensure that Python flushes each output line right away after 
> it's written.

How would I do that, is this sufficient?

#!/usr/bin/python 
import sys
import nemeth
n=nemeth.nemeth ()

while True:
  input=raw_input()
  sys.stdout.write (n.translate(input)+"\n")
  sys.stdout.flush()

At the moment I just get each Braille cell full with 8 dots, so it's not
working... The output of the script is something like 
\frac{1}{2} input gives 
1/2 output... Is this ok for brltty to handle? 

Thanks for your help, 

Dan


More information about the BRLTTY mailing list