The inverse of the logistic distribution is not difficult to find, so you can use the Inverse Transform Pattern . The main algorithm:
for each random variate x ~ logistic
generate a random variate y ~ Uniform(0, 1)
x := F^-1 (y)
where F ^ -1 is the inverse CDF for the logistic or desired distribution. Most programming languages will allow you to generate a uniform variable between 0 and 1 through some rand function.
python, 1000 :
from random import random
import math
import pylab
loc, scale = 0, 1
randvars = []
for i in range(1000):
x = random()
y = loc + scale * math.log(x / (1-x))
randvars.append(y)
pylab.hist(randvars)