how to find out, whether a path is socket or device

News123 news1234 at
Mon Aug 30 01:46:16 CEST 2010


Under Linux I'd like to find out, whether I got a file, a character
device or a socket as a parameter.

What is the right way to do this

How can I found out, whether a path name is:
- a file ( os.isfile() )
- a character device
- a socket
- a named pipe

thanks a lot for pointers

More information about the Python-list mailing list