def generate_password(self, min_chars):
        """generate_password(min_chars):
Randomly creates a password with minimum [min_chars] length."""

        valid_chars = "abcdefghijklmnopqrstuvwxyz0123456789,.-;:_\/!\"'#%&()="
        password = ""

        # the length will be min_chars plus a random value up to
        # and including min_chars
        for i in xrange(0, min_chars+randint(0, min_chars)):
            password += choice(valid_chars)

        return password
generate_password(min_chars):
Randomly creates a password with minimum [min_chars] length.
recipes/Python/65217_Password_generator/recipe-65217.py