isfifo?

R

rdmurray

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?

--RDM
 
M

Martin v. Löwis

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
 
R

rdmurray

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= said:
def isfifo(fn):
return stat.S_ISFIFO(os.stat(fn).st_mode)

Thanks. I should have thought of looking in os.stat. Odd that S_ISFIFO
didn't come up in my google search.

--RDM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
VetaMcRae
Top