Reposted from fupduck via python