in uberpoet/util.py [0:0]
def sudo_enabled():
"""Tells you if the current 'shell' has sudo permission."""
try:
subprocess.check_call(['sudo', '-n', 'true'])
return True
except subprocess.CalledProcessError:
return False