import random


def random_text(text_length=32):
    """Produces random characters of specified length for use in password or text"""
    possible_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!#$%()*+-/:;<=>?@[\]^_`{|}~'
    text = ''
    for _ in range(text_length):
        text += random.SystemRandom().choice(possible_chars)
    return text