[Tutor] pattern matching is too slow
vinayvinay at gmail.com
Fri Aug 12 20:42:38 CEST 2005
> Reading through other posts, looks like you got somewhare with the
> nonblocking IO. Can you comment on what you did to get it working? The
> whole fcntl thing?
I am able to use non-blocking I/O, but I am unable to get the mplayer
status messages. It's just not there in the mplayer output pipe. I
just posted on the mplayer community regarding this.
To use non-blocking I/O:
fcntl.fcntl(<file descriptor>, fcntl.F_SETFL, os.O_NONBLOCK) is
enough. If there's nothing to read from a pipe, instead of blocking,
an exception is generated.
More information about the Tutor