1
2
3
4
5
6
def generate_password( size = 9 ):
    """Return a system generated password"""
    from string import letters, digits
    from random import choice
    pool = letters + digits
    return ''.join( [ choice( pool ) for i in range( size ) ] )