[BRLTTY] Pure python file descriptor watcher code for BrlAPI?

Mario Lang mlang at delysid.org
Sun Feb 24 11:23:56 EST 2008


Samuel Thibault <samuel.thibault at ens-lyon.org> writes:

> Mario Lang, le Sun 24 Feb 2008 09:45:21 +0100, a écrit :
>> Orca uses glib to add a callback for when some data arrives
>> at the BrlAPI file descriptor.  This is very useful to implement
>> a callback driven system for receiving brlapi keypresses.
>> Does anyone have code for doing this in pure python, without a dependency
>> on glib?
>
> The problem is: when should callbacks be called?
>
> In an event-driven glib application, it's easy: it's during the main
> loop.
>
> In a general python application, which is not necessarily event-driven,
> when would that be?  The problem here is about concurrency with what
> your application is currently doing, and is just the same as if you were
> just starting a thread that keeps calling brlapi.readKey(), which then
> runs concurrently with the main thread.

Right, I realized this after I sent off this mail.  I didnt think
it all the way through.

-- 
CYa,
  ⡍⠁⠗⠊⠕ | Debian Developer <URL:http://debian.org/>
  .''`. | Get my public key via finger mlang at db.debian.org
 : :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
 `. `'
   `-      <URL:http://delysid.org/>  <URL:http://www.staff.tugraz.at/mlang/>


More information about the BRLTTY mailing list