Sockets for a file
Irmen de Jong
irmen at NOSPAMREMOVETHISxs4all.nl
Mon Jul 22 17:08:01 EDT 2002
Teja Sastry wrote:
> I would like to know if we can create a unix socket for a file (like
> we do in C or C++ with struct sockaddr_un)
> I want to wait on a file in python and trigger some function if the
> file gets some data written in it by another program.
I'm not sure what you're trying to do, but Python allows you to
use the select call on sockets and file objects (in fact, any
object with a fileno() method). See the select module.
BTW: this doesn't work on Windows.
Irmen
More information about the Python-list
mailing list