Created
November 27, 2014 14:05
-
-
Save chrigl/f0e6390aeff719c38460 to your computer and use it in GitHub Desktop.
issocket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def issocket(fname): | |
""" Returns True if fname is a socket. """ | |
if not os.path.exists(fname): | |
return False | |
return stat.S_ISSOCK(os.stat(fname).st_mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment