random.gauss()

random.gauss(mu, sigma) Gaussian distribution. mu is the mean, and sigma is the standard deviation. This is slightly faster than the normalvariate() function defined below.

random.gammavariate()

random.gammavariate(alpha, beta) Gamma distribution. (Not the gamma function!) Conditions on the parameters are alpha > 0 and beta > 0. The probability distribution function is: x ** (alpha - 1) * math.exp(-x / beta) pdf(x) = -------------------------------------- math.gamma(alpha) * beta ** alpha

random.expovariate()

random.expovariate(lambd) Exponential distribution. lambd is 1.0 divided by the desired mean. It should be nonzero. (The parameter would be called “lambda”, but that is a reserved word in Python.) Returned values range from 0 to positive infinity if lambd is positive, and from negative infinity to 0 if lambd is negative.

random.choice()

random.choice(seq) Return a random element from the non-empty sequence seq. If seq is empty, raises IndexError.

random.betavariate()

random.betavariate(alpha, beta) Beta distribution. Conditions on the parameters are alpha > 0 and beta > 0. Returned values range between 0 and 1.

quopri.encodestring()

quopri.encodestring(s, quotetabs=False, header=False) Like encode(), except that it accepts a source bytes and returns the corresponding encoded bytes. By default, it sends a False value to quotetabs parameter of the encode() function.

quopri.encode()

quopri.encode(input, output, quotetabs, header=False) Encode the contents of the input file and write the resulting quoted- printable data to the output file. input and output must be binary file objects. quotetabs, a flag which controls whether to encode embedded spaces and tabs must be provideda and when true it encodes such embedded whitespace, and when false it leaves them unencoded. Note that spaces and tabs appearing at the end of lines are always encoded, as per RFC 1521. header is a

quopri.decodestring()

quopri.decodestring(s, header=False) Like decode(), except that it accepts a source bytes and returns the corresponding decoded bytes.

quopri.decode()

quopri.decode(input, output, header=False) Decode the contents of the input file and write the resulting decoded binary data to the output file. input and output must be binary file objects. If the optional argument header is present and true, underscore will be decoded as space. This is used to decode “Q”-encoded headers as described in RFC 1522: “MIME (Multipurpose Internet Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text”.

quit

quit(code=None) exit(code=None) Objects that when printed, print a message like “Use quit() or Ctrl-D (i.e. EOF) to exit”, and when called, raise SystemExit with the specified exit code.