Created
April 23, 2014 22:36
-
-
Save whot/11234893 to your computer and use it in GitHub Desktop.
script to print error numbers
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
#!/usr/bin/env python | |
import os | |
import sys | |
if len(sys.argv) > 1: | |
sig = int(sys.argv[1]) | |
print "%d: %s" % (sig, os.strerror(sig)) | |
else: | |
for err, strerrno in os.errno.errorcode.items(): | |
print "%s: %s" % (err, strerrno) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment