isfifo?

"Martin v. Löwis" martin at v.loewis.de
Sat Feb 7 12:35:02 EST 2009


rdmurray at bitdance.com wrote:
> I've googled and looked through os.path, but I don't see a method for
> determining if a path points to a FIFO.  Anyone know of a simple way to
> do so?

def isfifo(fn):
  return stat.S_ISFIFO(os.stat(fn).st_mode)

HTH,
Martin



More information about the Python-list mailing list