A CDF function in python