Skip to content

Instantly share code, notes, and snippets.

@whot
Created April 23, 2014 22:36
Show Gist options
  • Save whot/11234893 to your computer and use it in GitHub Desktop.
Save whot/11234893 to your computer and use it in GitHub Desktop.
script to print error numbers
#!/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